diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-11 14:19:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-11 14:19:18 +0200 |
commit | d8877d2df5440b04c4a9c7eeced3c48cf6661536 (patch) | |
tree | 9b6cbad1e975449be146aa519f141f8bb2ce494d | |
parent | 96028e3f48bae400e9c160558c63dbb454e5cdd5 (diff) | |
parent | 8d993f635776cb5151bba159939700e490576593 (diff) |
Merge pull request #29539 from qarmin/fix_crash_with_get_keywords_color
Fix crash with get_keywords_color
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
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]; } |