From f35d35cc94cfdcd71bfd56ae71011f4a7553090c Mon Sep 17 00:00:00 2001 From: Faerbit Date: Sat, 14 Mar 2015 15:01:06 +0100 Subject: [PATCH] Do not render waterPlane if it doesn't exist. --- game/level.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/level.cc b/game/level.cc index a036d12..d512e68 100644 --- a/game/level.cc +++ b/game/level.cc @@ -64,7 +64,7 @@ void Level::render(ACGL::OpenGL::SharedShaderProgram shader, bool lightingPass, objects.at(i)->render(shader, lightingPass, false, viewProjectionMatrix, shadowVPs); } } - if (lightingPass) { + if (lightingPass && waterPlane) { waterPlane->render(shader, lightingPass, true, viewProjectionMatrix, shadowVPs); } }