소스 검색

Add null checking when finding a lightmap baking path

Kongfa Waroros 2 년 전
부모
커밋
aeb9b8381a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      editor/plugins/lightmap_gi_editor_plugin.cpp

+ 1 - 1
editor/plugins/lightmap_gi_editor_plugin.cpp

@@ -79,7 +79,7 @@ void LightmapGIEditorPlugin::_bake_select_file(const String &p_file) {
 		switch (err) {
 			case LightmapGI::BAKE_ERROR_NO_SAVE_PATH: {
 				String scene_path = lightmap->get_scene_file_path();
-				if (scene_path.is_empty()) {
+				if (scene_path.is_empty() && lightmap->get_owner()) {
 					scene_path = lightmap->get_owner()->get_scene_file_path();
 				}
 				if (scene_path.is_empty()) {