Verify scenario is not null before accessing it

This commit is contained in:
Michał Janiszewski committed 2017-06-09 22:18:15 +02:00
1 parent 6eb14aa90d
commit 14bbe2c2c2
1 file changed
+1 -1
+1 -1
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;