Skip to content

Commit 3212d39

Browse files
committedOct 20, 2016
[symbology] prevent creation of a zero width/height line pattern image (fixes #15728)
1 parent 8c7d772 commit 3212d39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/core/symbology-ng/qgsfillsymbollayer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,8 @@ void QgsLinePatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext&
26542654
width += 2 * xBuffer;
26552655
height += 2 * yBuffer;
26562656

2657-
if ( width > 10000 || height > 10000 ) //protect symbol layer from eating too much memory
2657+
//protect from zero width/height image and symbol layer from eating too much memory
2658+
if ( width > 10000 || height > 10000 || width == 0 || height == 0 )
26582659
{
26592660
return;
26602661
}

0 commit comments

Comments
 (0)
Please sign in to comment.