Profile: fix a crash that happens when restoring a backup.

This commit is contained in:
Guillaume Jacquemin 2021-10-04 18:17:51 +02:00
parent 8c81b7811b
commit bfe9a2c3a8

View file

@ -355,7 +355,7 @@ auto Profile::getResource(const char* container, Int id) -> Int {
return 0; return 0;
} }
static auto predicate = [&id](UnrealPropertyBase::ptr& prop){ auto predicate = [&id](UnrealPropertyBase::ptr& prop){
auto res_prop = static_cast<ResourceItemValue*>(prop.get()); auto res_prop = static_cast<ResourceItemValue*>(prop.get());
return res_prop->id == id; return res_prop->id == id;
}; };