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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user