Merge pull request #77751 from gongpha/crash!-lmnode-null-owner

Add null checking when finding a lightmap baking path
This commit is contained in:
Yuri Sizov 2023-06-02 12:19:38 +02:00 committed by GitHub
commit 300b736074
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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()) {