Skip to content

Commit

Permalink
[composer] Fix crash caused by map items with zero height/width
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 24, 2014
1 parent b59a01c commit 5186a68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -171,6 +171,11 @@ void QgsComposerMap::draw( QPainter *painter, const QgsRectangle& extent, const
{
return;
}
if ( size.width() == 0 || size.height() == 0 )
{
//don't attempt to draw if size is invalid
return;
}

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

Expand Down

0 comments on commit 5186a68

Please sign in to comment.