From 60cb84fd9dff3c9d933e475bba23d5facd619178 Mon Sep 17 00:00:00 2001 From: Ted John Date: Thu, 5 Jan 2017 18:19:20 +0000 Subject: [PATCH] Handle nullptr for object when getting track designs --- src/openrct2/ride/TrackDesignRepository.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index fdec5098a5..992894a400 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -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)