summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2019-03-01 17:24:57 -0300
committerJuan Linietsky <juan@godotengine.org>2019-03-01 17:24:57 -0300
commit51b80f685752dd0ccdd3debd15e339466adfb208 (patch)
tree1ef5b72050a44da90b68c9ca9acb090934a91ae5 /scene
parent8a9119ad7f4c448e81e636367efe580247337d60 (diff)
Fixed some crashers, closes #26393
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/graph_edit.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index f3f2e586a6..68e734502b 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -261,8 +261,9 @@ void GraphEdit::add_child_notify(Node *p_child) {
void GraphEdit::remove_child_notify(Node *p_child) {
Control::remove_child_notify(p_child);
-
- top_layer->call_deferred("raise"); //top layer always on top!
+ if (is_inside_tree()) {
+ top_layer->call_deferred("raise"); //top layer always on top!
+ }
GraphNode *gn = Object::cast_to<GraphNode>(p_child);
if (gn) {
gn->disconnect("offset_changed", this, "_graph_node_moved");