mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 13:33:02 +01:00
Protect against Sources being null
This commit is contained in:
@@ -47,7 +47,7 @@ void BannerObject::ReadLegacy(IReadObjectContext* context, IStream* stream)
|
||||
auto item = objectRepository.FindObject(identifier);
|
||||
if (item != nullptr)
|
||||
{
|
||||
auto sourceGame = item->Sources[0];
|
||||
auto sourceGame = item->GetFirstSourceGame();
|
||||
if (sourceGame == OBJECT_SOURCE_WACKY_WORLDS
|
||||
|| sourceGame == OBJECT_SOURCE_TIME_TWISTER
|
||||
|| sourceGame == OBJECT_SOURCE_CUSTOM)
|
||||
|
||||
Reference in New Issue
Block a user