Skip to content
Permalink
Browse files

Merge pull request #3645 from nirvn/linefillpattern_fix

[symbology] prevent creation of a zero width/height line pattern image (fixes #15728)
  • Loading branch information
nyalldawson committed Oct 20, 2016
2 parents 8c7d772 + 3212d39 commit 3bdc77d3daa4257c926932204ff4a9340084788a
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/symbology-ng/qgsfillsymbollayer.cpp
@@ -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;
}

0 comments on commit 3bdc77d

Please sign in to comment.
You can’t perform that action at this time.