From 8423d98e1c5df6a2b146cc8d8a9c1e1f25d32768 Mon Sep 17 00:00:00 2001 From: qarmin Date: Thu, 6 Jun 2019 12:59:29 +0200 Subject: [PATCH] Fix crash with get_keywords_color (cherry picked from commit 8d993f635776cb5151bba159939700e490576593) --- scene/gui/text_edit.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 631ddaf7de5..986f2e5d4cd 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4457,6 +4457,8 @@ bool TextEdit::has_keyword_color(String p_keyword) const { } Color TextEdit::get_keyword_color(String p_keyword) const { + + ERR_FAIL_COND_V(!keywords.has(p_keyword), Color()) return keywords[p_keyword]; }