Преглед на файлове

Merge pull request #82181 from Chaosus/curve_fix_crash

Fix CurveEdit crash when dragging the curve if it is null
Rémi Verschelde преди 1 година
родител
ревизия
810021c7cd
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      editor/plugins/curve_editor_plugin.cpp

+ 3 - 0
editor/plugins/curve_editor_plugin.cpp

@@ -140,6 +140,9 @@ void CurveEdit::_notification(int p_what) {
 
 void CurveEdit::gui_input(const Ref<InputEvent> &p_event) {
 	ERR_FAIL_COND(p_event.is_null());
+	if (curve.is_null()) {
+		return;
+	}
 
 	Ref<InputEventKey> k = p_event;
 	if (k.is_valid()) {