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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user