Merge pull request #3645 from nirvn/linefillpattern_fix

[symbology] prevent creation of a zero width/height line pattern image (fixes #15728)
This commit is contained in:
Nyall Dawson 2016-10-20 16:46:07 +10:00 committed by GitHub
commit 3bdc77d3da

View File

@ -2654,7 +2654,8 @@ void QgsLinePatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext&
width += 2 * xBuffer;
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;
}