From 9a1d9a41eba29bbb9608b0b0f8f9c2ca65ab426f Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Sat, 26 Aug 2017 22:50:15 +0200 Subject: [PATCH] Add several missing Null checks in _notification This fixes #6118 --- editor/plugins/collision_polygon_editor_plugin.cpp | 3 +++ modules/gridmap/grid_map_editor_plugin.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp index 5520d196e0e..c6fa7962267 100644 --- a/editor/plugins/collision_polygon_editor_plugin.cpp +++ b/editor/plugins/collision_polygon_editor_plugin.cpp @@ -48,6 +48,9 @@ void CollisionPolygonEditor::_notification(int p_what) { } break; case NOTIFICATION_PROCESS: { + if (!node) { + return; + } if (node->get_depth() != prev_depth) { _polygon_draw(); diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 561efb9d0f5..3bab1bfbc1a 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -835,6 +835,9 @@ void GridMapEditor::_notification(int p_what) { duplicate_instance = RID(); } else if (p_what == NOTIFICATION_PROCESS) { + if (!node) { + return; + } Transform xf = node->get_global_transform();