Browse Source

Add several missing Null checks in _notification

This fixes #6118
Hein-Pieter van Braam 8 years ago
parent
commit
9a1d9a41eb

+ 3 - 0
editor/plugins/collision_polygon_editor_plugin.cpp

@@ -48,6 +48,9 @@ void CollisionPolygonEditor::_notification(int p_what) {
 
 
 		} break;
 		} break;
 		case NOTIFICATION_PROCESS: {
 		case NOTIFICATION_PROCESS: {
+			if (!node) {
+				return;
+			}
 
 
 			if (node->get_depth() != prev_depth) {
 			if (node->get_depth() != prev_depth) {
 				_polygon_draw();
 				_polygon_draw();

+ 3 - 0
modules/gridmap/grid_map_editor_plugin.cpp

@@ -835,6 +835,9 @@ void GridMapEditor::_notification(int p_what) {
 		duplicate_instance = RID();
 		duplicate_instance = RID();
 
 
 	} else if (p_what == NOTIFICATION_PROCESS) {
 	} else if (p_what == NOTIFICATION_PROCESS) {
+		if (!node) {
+			return;
+		}
 
 
 		Transform xf = node->get_global_transform();
 		Transform xf = node->get_global_transform();