Fix: Missing early return when asset isn't found

This didn't cause a crash since `resolve_asset_weak_reference_to_full_path`
doesn't actually use the `this` pointer, but it's still quite unsafe.
This commit is contained in:
Hans Goudey
2024-03-28 13:40:04 -04:00
parent a7cdb9e94d
commit d5a61a8f55

View File

@@ -103,6 +103,7 @@ static const asset_system::AssetRepresentation *find_asset_from_weak_ref(
asset_system::all_library_reference());
if (!all_library) {
BKE_report(reports, RPT_WARNING, "Asset loading is unfinished");
return nullptr;
}
const std::string full_path = all_library->resolve_asset_weak_reference_to_full_path(weak_ref);