diff options
author | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
commit | 0a06942e4e46783a6a56e7f42bf3e57280fe003a (patch) | |
tree | d4e809ba2584d19467547d60bb26c41c0124e6d6 | |
parent | edaff1bdeaddac9e86417bbc4121f3e7bee1e983 (diff) | |
download | scummvm-rg350-0a06942e4e46783a6a56e7f42bf3e57280fe003a.tar.gz scummvm-rg350-0a06942e4e46783a6a56e7f42bf3e57280fe003a.tar.bz2 scummvm-rg350-0a06942e4e46783a6a56e7f42bf3e57280fe003a.zip |
GRAPHICS: Skip empty rects and empty shadows in VectorRendererSpec::drawSquareShadow.
-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 5e53e61241..b360327c55 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -1865,6 +1865,11 @@ drawCircleAlg(int x1, int y1, int r, PixelType color, VectorRenderer::FillMode f template<typename PixelType> void VectorRendererSpec<PixelType>:: drawSquareShadow(int x, int y, int w, int h, int offset) { + // Do nothing for empty rects or no shadow offset. + if (w <= 0 || h <= 0 || offset <= 0) { + return; + } + PixelType *ptr = (PixelType *)_activeSurface->getBasePtr(x + w - 1, y + offset); int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel; int i, j; |