summaryrefslogtreecommitdiff
path: root/src/render/sdl2softwaregraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-25 23:10:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-25 23:31:02 +0300
commitaf86a79f6ac5c11d1986be8a3d549fef03482789 (patch)
tree897f5ea665c01daf2bf01dbe1abd677bb8b2a68d /src/render/sdl2softwaregraphics.cpp
parent7ee1d89a656c05b62fa3104b59504afed0037b69 (diff)
downloadplus-af86a79f6ac5c11d1986be8a3d549fef03482789.tar.gz
plus-af86a79f6ac5c11d1986be8a3d549fef03482789.tar.bz2
plus-af86a79f6ac5c11d1986be8a3d549fef03482789.tar.xz
plus-af86a79f6ac5c11d1986be8a3d549fef03482789.zip
Add missing checks into render directory.
Diffstat (limited to 'src/render/sdl2softwaregraphics.cpp')
-rw-r--r--src/render/sdl2softwaregraphics.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp
index 1c0958e6e..f7e5b9ee1 100644
--- a/src/render/sdl2softwaregraphics.cpp
+++ b/src/render/sdl2softwaregraphics.cpp
@@ -727,6 +727,8 @@ void SDL2SoftwareGraphics::calcTileCollection(ImageCollection *const vertCol,
const Image *const image,
int x, int y)
{
+ if (!vertCol)
+ return;
if (vertCol->currentImage != image)
{
ImageVertexes *const vert = new ImageVertexes();
@@ -745,6 +747,8 @@ void SDL2SoftwareGraphics::calcTileCollection(ImageCollection *const vertCol,
void SDL2SoftwareGraphics::drawTileCollection(const ImageCollection
*const vertCol)
{
+ if (!vertCol)
+ return;
const ImageVertexesVector &draws = vertCol->draws;
const ImageCollectionCIter it_end = draws.end();
for (ImageCollectionCIter it = draws.begin(); it != it_end; ++ it)
@@ -765,6 +769,8 @@ void SDL2SoftwareGraphics::drawTileCollection(const ImageCollection
void SDL2SoftwareGraphics::drawTileVertexes(const ImageVertexes *const vert)
{
+ if (!vert)
+ return;
// vert and img must be != 0
const Image *const img = vert->image;
const DoubleRects *const rects = &vert->sdl;