1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-01 16:38:31 +00:00

Merge pull request #29980 from Dentrax/directed-by-qarmin

Fix some editor crashes
This commit is contained in:
Rémi Verschelde
2019-07-01 14:59:29 +02:00
committed by GitHub
11 changed files with 23 additions and 6 deletions

View File

@@ -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");