1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Verify scenario is not null before accessing it

This commit is contained in:
Michał Janiszewski
2017-06-09 22:16:57 +02:00
parent 6eb14aa90d
commit 14bbe2c2c2

View File

@@ -313,7 +313,7 @@ private:
for (size_t i = 0; i < numScenarios; i++)
{
const scenario_index_entry * scenario = _scenarioRepository->GetByIndex(i);
if (scenario->source_index == sourceDesc.index)
if (scenario && scenario->source_index == sourceDesc.index)
{
path = scenario->path;
break;