浏览代码

Merge pull request #10669 from hpvb/fix-6118

Add several missing Null checks in _notification
Rémi Verschelde 8 年之前
父节点
当前提交
3ec9e26cb4
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 3 0
      editor/plugins/collision_polygon_editor_plugin.cpp
  2. 3 0
      modules/gridmap/grid_map_editor_plugin.cpp

+ 3 - 0
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();

+ 3 - 0
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();