From cd6e7f3d906b7ea76352132e325372617520fe4c Mon Sep 17 00:00:00 2001 From: vlj Date: Fri, 9 May 2014 19:32:52 +0200 Subject: [PATCH] Fix an assert. --- src/graphics/render.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/graphics/render.cpp b/src/graphics/render.cpp index 8818c2c1c..0ea38494a 100644 --- a/src/graphics/render.cpp +++ b/src/graphics/render.cpp @@ -610,15 +610,16 @@ void IrrDriver::computeCameraMatrix(scene::ICameraSceneNode * const camnode) float up = box.MaxEdge.Y; float down = box.MinEdge.Y; + core::matrix4 tmp_matrix; + // Prevent Matrix without extend if (left == right || up == down) { Log::error("Shadows", "Shadows Near/Far plane have a 0 area"); + sun_ortho_matrix.push_back(tmp_matrix); continue; } - core::matrix4 tmp_matrix; - tmp_matrix.buildProjectionMatrixOrthoLH(left, right, up, down, 30, z);