Quellcode durchsuchen

Add error condition for Control EXIT_TREE notif

Lenny Critchley vor 3 Jahren
Ursprung
Commit
3d1249a520
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  1. 2 0
      scene/gui/control.cpp

+ 2 - 0
scene/gui/control.cpp

@@ -471,6 +471,8 @@ void Control::_notification(int p_notification) {
 			_size_changed();
 		} break;
 		case NOTIFICATION_EXIT_TREE: {
+			ERR_FAIL_COND(!get_viewport());
+
 			get_viewport()->_gui_remove_control(this);
 
 		} break;