summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-01 14:59:29 +0200
committerGitHub <noreply@github.com>2019-07-01 14:59:29 +0200
commit6b30f284a0544972f761be3e92ad8d1b176c9f9f (patch)
tree5edd19124ce8c9265a869a8171541d5ff7c60e17 /scene/main
parentb0ce9401ffa731cc346ab6762fd0794709634428 (diff)
parent7d8d337b2c47df88498067ff9091386691242144 (diff)
Merge pull request #29980 from Dentrax/directed-by-qarmin
Fix some editor crashes
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/node.cpp6
-rw-r--r--scene/main/viewport.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index a580a7f8ac..5888760973 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -71,6 +71,8 @@ void Node::_notification(int p_notification) {
} break;
case NOTIFICATION_ENTER_TREE: {
+ ERR_FAIL_COND(!get_viewport());
+ ERR_FAIL_COND(!get_tree());
if (data.pause_mode == PAUSE_MODE_INHERIT) {
@@ -94,6 +96,8 @@ void Node::_notification(int p_notification) {
} break;
case NOTIFICATION_EXIT_TREE: {
+ ERR_FAIL_COND(!get_viewport());
+ ERR_FAIL_COND(!get_tree());
get_tree()->node_count--;
orphan_node_count++;
@@ -840,6 +844,8 @@ bool Node::is_processing_internal() const {
void Node::set_process_priority(int p_priority) {
data.process_priority = p_priority;
+ ERR_FAIL_COND(!data.tree);
+
if (is_processing())
data.tree->make_group_changed("idle_process");
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index dcd70a1844..8561d9aedb 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1701,6 +1701,8 @@ bool Viewport::_gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_che
void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
+ ERR_FAIL_COND(p_event.is_null())
+
//?
/*
if (!is_visible()) {