Skip to content

Commit 5186a68

Browse files
committed
[composer] Fix crash caused by map items with zero height/width
1 parent b59a01c commit 5186a68

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/core/composer/qgscomposermap.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@ void QgsComposerMap::draw( QPainter *painter, const QgsRectangle& extent, const
171171
{
172172
return;
173173
}
174+
if ( size.width() == 0 || size.height() == 0 )
175+
{
176+
//don't attempt to draw if size is invalid
177+
return;
178+
}
174179

175180
const QgsMapSettings& ms = mComposition->mapSettings();
176181

0 commit comments

Comments
 (0)