[composer] Fix possible crash in scale bar update (refs #11394)

This commit is contained in:
Nyall Dawson 2014-10-13 22:53:57 +11:00
parent 08d80160ea
commit 9f063df86c

View File

@ -407,7 +407,7 @@ void QgsComposerScaleBar::adjustBoxSize()
void QgsComposerScaleBar::update()
{
//Don't adjust box size for numeric scale bars:
if ( mStyle->name() != "Numeric" )
if ( mStyle && mStyle->name() != "Numeric" )
{
adjustBoxSize();
}