diff options
author | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-02-21 14:41:29 +0100 |
commit | 1c4f41feedb5a92714964b701b61f12fbde0b2f1 (patch) | |
tree | f5e6c1818cda6c4add00116e0facdd09e27dd0ed | |
parent | df65bad9d23c77e2d2c57c3db8fee53b5470e1ff (diff) | |
download | scummvm-rg350-1c4f41feedb5a92714964b701b61f12fbde0b2f1.tar.gz scummvm-rg350-1c4f41feedb5a92714964b701b61f12fbde0b2f1.tar.bz2 scummvm-rg350-1c4f41feedb5a92714964b701b61f12fbde0b2f1.zip |
GRAPHICS: Skip empty rects in VectorRendererSpec::drawTriangleFast.
-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 b9ad82bf1a..065be50333 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -1584,6 +1584,11 @@ drawTriangleVertAlg(int x1, int y1, int w, int h, bool inverted, PixelType color template<typename PixelType> void VectorRendererSpec<PixelType>:: drawTriangleFast(int x1, int y1, int size, bool inverted, PixelType color, VectorRenderer::FillMode fill_m) { + // Do not draw anything for empty rects. + if (size <= 0) { + return; + } + int pitch = _activeSurface->pitch / _activeSurface->format.bytesPerPixel; if (!inverted) { |