diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-08-26 22:53:28 +0200 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2017-08-26 23:40:45 +0200 |
commit | 3e25cf9e05103e3ef3279c93c9e9170cbcc7eaaf (patch) | |
tree | 30466dffa48e44147b8d592dda7279c35105346d /modules/gdscript/gd_editor.cpp | |
parent | 53c0010932f9c1becb63c16243f3a00ede359989 (diff) | |
download | redot-engine-3e25cf9e05103e3ef3279c93c9e9170cbcc7eaaf.tar.gz |
Add two missing Null checks
These Null checks were removed in #10581 but actually changed the
logic of the functions in this case.
This fixes #10654
Diffstat (limited to 'modules/gdscript/gd_editor.cpp')
-rw-r--r-- | modules/gdscript/gd_editor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index d06da08551..905c784ab9 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -1546,7 +1546,9 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N scr = NULL; } } else { - on_script = obj->get_script(); + if (obj) { + on_script = obj->get_script(); + } } } @@ -2237,7 +2239,9 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base scr = NULL; } } else { - on_script = obj->get_script(); + if (obj) { + on_script = obj->get_script(); + } } } |