summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_compiler.cpp
diff options
context:
space:
mode:
authorZher Huei Lee <lee.zh.92@gmail.com>2015-12-30 01:02:31 +0000
committerZher Huei Lee <lee.zh.92@gmail.com>2015-12-30 01:02:31 +0000
commit61a1f596cc19fd47ff1c8d1f5f5d7c4af300bc8f (patch)
tree697e4d8aa285b5fca9255d67d8baa9e5d8d9ede9 /modules/gdscript/gd_compiler.cpp
parent821351be0420c4b3def6b83c287ee7463e6e3506 (diff)
added missing null check
for p_func inside _parse_function
Diffstat (limited to 'modules/gdscript/gd_compiler.cpp')
-rw-r--r--modules/gdscript/gd_compiler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp
index add6235f32..7b07010529 100644
--- a/modules/gdscript/gd_compiler.cpp
+++ b/modules/gdscript/gd_compiler.cpp
@@ -1218,7 +1218,7 @@ Error GDCompiler::_parse_function(GDScript *p_script,const GDParser::ClassNode *
bool is_initializer=!p_for_ready && !p_func;
- if (is_initializer || String(p_func->name)=="_init") {
+ if (is_initializer || (p_func && String(p_func->name)=="_init")) {
//parse initializer for class members
if (!p_func && p_class->extends_used && p_script->native.is_null()){