From af86a79f6ac5c11d1986be8a3d549fef03482789 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Jun 2015 23:10:21 +0300 Subject: Add missing checks into render directory. --- src/render/sdl2softwaregraphics.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/render/sdl2softwaregraphics.cpp') 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; -- cgit v1.2.3-60-g2f50