[symbology] prevent creation of a zero width/height line pattern image (fixes #15728)

This commit is contained in:
nirvn 2016-10-20 13:23:21 +07:00
parent 8c7d772f22
commit 3212d393c1

View File

@ -2654,7 +2654,8 @@ void QgsLinePatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext&
width += 2 * xBuffer; width += 2 * xBuffer;
height += 2 * yBuffer; height += 2 * yBuffer;
if ( width > 10000 || height > 10000 ) //protect symbol layer from eating too much memory //protect from zero width/height image and symbol layer from eating too much memory
if ( width > 10000 || height > 10000 || width == 0 || height == 0 )
{ {
return; return;
} }