diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-08-11 15:15:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 15:15:43 +0200 |
commit | cf05486d8e77d4275b99562d925e3235d0953a77 (patch) | |
tree | 2b96163d9658424d2a9aa82931922839cd13cd70 /modules/gdscript/gdscript_parser.h | |
parent | 408651ddc02ffebe97effdf4a2226f19036875ed (diff) | |
parent | fbd07bf3bf04972fb1bbe289ba4f71784597a9e8 (diff) | |
download | redot-engine-cf05486d8e77d4275b99562d925e3235d0953a77.tar.gz |
Merge pull request #41055 from snichols/null-callee-fix
Fix crash with null callee
Diffstat (limited to 'modules/gdscript/gdscript_parser.h')
-rw-r--r-- | modules/gdscript/gdscript_parser.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.h b/modules/gdscript/gdscript_parser.h index c9ab3d4e12..edfe330c0c 100644 --- a/modules/gdscript/gdscript_parser.h +++ b/modules/gdscript/gdscript_parser.h @@ -383,6 +383,14 @@ public: CallNode() { type = CALL; } + + Type get_callee_type() const { + if (callee == nullptr) { + return Type::NONE; + } else { + return callee->type; + } + } }; struct CastNode : public ExpressionNode { |