Skip to content

Commit

Permalink
[symbology] prevent creation of a zero width/height line pattern image (
Browse files Browse the repository at this point in the history
fixes #15728)
  • Loading branch information
nirvn committed Oct 20, 2016
1 parent 8c7d772 commit 3212d39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/symbology-ng/qgsfillsymbollayer.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3212d39

Please sign in to comment.