Skip to content

Commit

Permalink
Merge pull request #82490 from NolanDC/fix_reimport_crash_for_non_loa…
Browse files Browse the repository at this point in the history
…dable_assets

Avoid import dock cleanup for non-loadable assets
  • Loading branch information
akien-mga committed Oct 3, 2023
2 parents 9af1983 + 3770ee3 commit 4e1fce3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions editor/import_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,12 @@ void ImportDock::_reimport_attempt() {

String imported_with = config->get_value("remap", "importer");
if (imported_with != importer_name) {
need_cleanup.push_back(params->paths[i]);
if (_find_owners(EditorFileSystem::get_singleton()->get_filesystem(), params->paths[i])) {
used_in_resources = true;
Ref<Resource> resource = ResourceLoader::load(params->paths[i]);
if (resource.is_valid()) {
need_cleanup.push_back(params->paths[i]);
if (_find_owners(EditorFileSystem::get_singleton()->get_filesystem(), params->paths[i])) {
used_in_resources = true;
}
}
}
}
Expand Down

0 comments on commit 4e1fce3

Please sign in to comment.