From df3fad11fd0e7093224c9f98e58a8e9493529cc2 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sat, 25 Jan 2020 13:16:27 +0800 Subject: [PATCH] Fixes crash in Spatial::notification --- scene/3d/spatial.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index b7cd2114db9..f1911348cea 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)