From 59f1ee9b9247aa7417d706988ce687406e931a51 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 26 Aug 2013 12:33:26 +0200 Subject: [PATCH] Fixed: Crash when trying to display a missing texture --- code/nel/src/gui/view_renderer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/src/gui/view_renderer.cpp b/code/nel/src/gui/view_renderer.cpp index c61d8fa51..6d3ef62e7 100644 --- a/code/nel/src/gui/view_renderer.cpp +++ b/code/nel/src/gui/view_renderer.cpp @@ -354,6 +354,9 @@ namespace NLGUI // start to draw at the reference corner getTextureSizeFromId (nTxId, txw, txh); + // to avoid a division by zero crash later + if (txw < 0 || txh < 0) return; + if (rot > 3) rot = 3; sint32 startX = x, startY = y;