diff options
author | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
commit | df65bad9d23c77e2d2c57c3db8fee53b5470e1ff (patch) | |
tree | 74d9a1e1e5940a165db0bc40fdfabde93e8a12c1 | |
parent | 5f61de0e683a34df6fbe66a8264318f2a049ef04 (diff) | |
download | scummvm-rg350-df65bad9d23c77e2d2c57c3db8fee53b5470e1ff.tar.gz scummvm-rg350-df65bad9d23c77e2d2c57c3db8fee53b5470e1ff.tar.bz2 scummvm-rg350-df65bad9d23c77e2d2c57c3db8fee53b5470e1ff.zip |
GRAPHICS: Skip empty rects in VectorRendererSpec::drawSquareAlg.
-rw-r--r-- | graphics/VectorRendererSpec.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index fda0021201..b9ad82bf1a 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -1244,6 +1244,11 @@ drawBevelTabAlg(int x, int y, int w, int h, int bevel, PixelType top_color, Pixe template<typename PixelType> void VectorRendererSpec<PixelType>:: drawSquareAlg(int x, int y, int w, int h, PixelType color, VectorRenderer::FillMode fill_m) { + // Do not draw anything for empty rects. + if (w <= 0 || h <= 0) { + return; + } + PixelType *ptr = (PixelType *)_activeSurface->getBasePtr(x, y); int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel; int max_h = h; |