summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--editor/plugins/lightmap_gi_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/lightmap_gi_editor_plugin.cpp b/editor/plugins/lightmap_gi_editor_plugin.cpp
index 6ba2072f72..b549a958e6 100644
--- a/editor/plugins/lightmap_gi_editor_plugin.cpp
+++ b/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()) {