diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2020-01-25 13:16:27 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2020-01-25 13:16:51 +0800 |
commit | df3fad11fd0e7093224c9f98e58a8e9493529cc2 (patch) | |
tree | a4231cef69968d34e11c44904df855fab42a3c7d | |
parent | e61edd69ea7a447242736e42462bcc4850339c5f (diff) | |
download | redot-engine-df3fad11fd0e7093224c9f98e58a8e9493529cc2.tar.gz |
Fixes crash in Spatial::notification
-rw-r--r-- | scene/3d/spatial.cpp | 1 |
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) |