Protect against use of null HazePointer.

This commit is contained in:
Nissim Hadar 2017-12-13 15:02:03 -08:00
parent b4df115507
commit 79f0124244

View file

@ -171,6 +171,9 @@ void DrawHaze::run(const render::RenderContextPointer& renderContext, const Inpu
model::HazePointer hazePointer = hazeStage->getHaze(hazeStage->_currentFrame._hazes.front());
if (hazePointer) {
batch.setUniformBuffer(HazeEffect_ParamsSlot, hazePointer->getHazeParametersBuffer());
} else {
// Something is wrong, so just quit Haze
return;
}
}