From 0a62226b1cc9c1b01ddab4feb9095ed7a5ba3e48 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 26 Mar 2011 14:48:19 +0200 Subject: Remove debug code and add checks in graphics classes. --- src/opengl1graphics.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/opengl1graphics.cpp') diff --git a/src/opengl1graphics.cpp b/src/opengl1graphics.cpp index e1d44de23..4a1322e6d 100644 --- a/src/opengl1graphics.cpp +++ b/src/opengl1graphics.cpp @@ -404,12 +404,18 @@ bool OpenGL1Graphics::calcImageRect(GraphicsVertexes* vert, Image *left _UNUSED_, Image *center _UNUSED_) { + if (!vert) + return false; + vert->init(x, y, w, h); return true; } void OpenGL1Graphics::drawImageRect2(GraphicsVertexes* vert, const ImageRect &imgRect) { + if (!vert) + return; + drawImageRect(vert->getX(), vert->getY(), vert->getW(), vert->getH(), imgRect.grid[0], imgRect.grid[2], imgRect.grid[6], imgRect.grid[8], imgRect.grid[1], imgRect.grid[5], imgRect.grid[7], imgRect.grid[3], -- cgit v1.2.3-60-g2f50