Protect against Sources being null

This commit is contained in:
Gymnasiast committed 2018-07-30 22:01:04 +02:00
1 parent 8ff6831c57
commit edaebd5163
4 files changed
+11 -3

No files matched your search

+1 -1
View File
@@ -51,7 +51,7 @@ void FootpathItemObject::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)
{