summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-08-27 02:07:41 +0200
committerGitHub <noreply@github.com>2017-08-27 02:07:41 +0200
commit3ec9e26cb4a5a94bd8770f51c99f2a9e11df9b7f (patch)
treea27e362e9918be54c06cdf1e9b299baf71245f7e
parent68fc2146d1431973d3f1e7afd743a9cc8da8cac4 (diff)
parent9a1d9a41eba29bbb9608b0b0f8f9c2ca65ab426f (diff)
Merge pull request #10669 from hpvb/fix-6118
Add several missing Null checks in _notification
-rw-r--r--editor/plugins/collision_polygon_editor_plugin.cpp3
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp
index 5520d196e0..c6fa796226 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 561efb9d0f..3bab1bfbc1 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();