1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 19:43:06 +01:00

Handle nullptr for object when getting track designs

This commit is contained in:
Ted John
2017-01-05 18:19:20 +00:00
parent e1ace9528d
commit 60cb84fd9d

View File

@@ -374,13 +374,13 @@ extern "C"
size_t track_repository_get_count_for_ride(uint8 rideType, const utf8 * entry)
{
ITrackDesignRepository * repo = GetTrackDesignRepository();
return repo->GetCountForObjectEntry(rideType, entry);
return repo->GetCountForObjectEntry(rideType, String::ToStd(entry));
}
size_t track_repository_get_items_for_ride(track_design_file_ref * * outRefs, uint8 rideType, const utf8 * entry)
{
ITrackDesignRepository * repo = GetTrackDesignRepository();
return repo->GetItemsForObjectEntry(outRefs, rideType, entry);
return repo->GetItemsForObjectEntry(outRefs, rideType, String::ToStd(entry));
}
bool track_repository_delete(const utf8 * path)