diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-26 14:48:19 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-26 14:48:19 +0200 |
commit | 0a62226b1cc9c1b01ddab4feb9095ed7a5ba3e48 (patch) | |
tree | 7e0611c09922dee95259c23ac02df14530be45a3 /src/opengl1graphics.cpp | |
parent | 8403dcf857c9cc639e8162edd5d4df4af07274bc (diff) | |
download | manaplus-0a62226b1cc9c1b01ddab4feb9095ed7a5ba3e48.tar.gz manaplus-0a62226b1cc9c1b01ddab4feb9095ed7a5ba3e48.tar.bz2 manaplus-0a62226b1cc9c1b01ddab4feb9095ed7a5ba3e48.tar.xz manaplus-0a62226b1cc9c1b01ddab4feb9095ed7a5ba3e48.zip |
Remove debug code and add checks in graphics classes.
Diffstat (limited to 'src/opengl1graphics.cpp')
-rw-r--r-- | src/opengl1graphics.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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], |