summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-25 09:59:37 +0100
committerGitHub <noreply@github.com>2020-01-25 09:59:37 +0100
commitf67814116a5f60a91e45c407d018b14557058da7 (patch)
treea4231cef69968d34e11c44904df855fab42a3c7d
parente61edd69ea7a447242736e42462bcc4850339c5f (diff)
parentdf3fad11fd0e7093224c9f98e58a8e9493529cc2 (diff)
Merge pull request #35543 from timothyqiu/notification-crash
Fixes crash in Spatial::notification
-rw-r--r--scene/3d/spatial.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index b7cd2114db..f1911348ce 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -125,6 +125,7 @@ void Spatial::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
+ ERR_FAIL_COND(!get_tree());
Node *p = get_parent();
if (p)