summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_parser.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-08-11 15:15:43 +0200
committerGitHub <noreply@github.com>2020-08-11 15:15:43 +0200
commitcf05486d8e77d4275b99562d925e3235d0953a77 (patch)
tree2b96163d9658424d2a9aa82931922839cd13cd70 /modules/gdscript/gdscript_parser.h
parent408651ddc02ffebe97effdf4a2226f19036875ed (diff)
parentfbd07bf3bf04972fb1bbe289ba4f71784597a9e8 (diff)
downloadredot-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.h8
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 {