summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-06-06 12:59:29 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-06-06 12:59:29 +0200
commit8d993f635776cb5151bba159939700e490576593 (patch)
tree5daeb631146a1e6f473dd38ac6ae695e0976d4bc /scene/gui
parent197b65f32ac811f79bc5599fbfe8cf83914b6873 (diff)
Fix crash with get_keywords_color
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 6203b15992..2258141385 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -4682,6 +4682,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];
}