소스 검색

Fix editor segfault when using a path3d without a curve3d

Mike Precup 1 개월 전
부모
커밋
0f04d5ce53
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      editor/scene/3d/path_3d_editor_plugin.cpp

+ 1 - 1
editor/scene/3d/path_3d_editor_plugin.cpp

@@ -741,7 +741,7 @@ void Path3DEditorPlugin::edit(Object *p_object) {
 	} else {
 		Path3D *pre = path;
 		path = nullptr;
-		if (pre) {
+		if (pre && pre->get_curve().is_valid()) {
 			pre->get_curve()->emit_signal(CoreStringName(changed));
 		}
 	}