[composer] Fix crash with expression driven picture items

This commit is contained in:
Nyall Dawson 2014-05-16 18:26:40 +10:00
parent f194822b95
commit eb5627c73b

View File

@ -401,7 +401,7 @@ void QgsComposerPicture::loadPicture( const QFile& file )
{
recalculateSize();
}
else if ( !( file.fileName().isEmpty() ) || ( mUseSourceExpression && mPictureExpr->hasEvalError() ) )
else if ( !( file.fileName().isEmpty() ) || ( mUseSourceExpression && mPictureExpr && mPictureExpr->hasEvalError() ) )
{
//trying to load an invalid file or bad expression, show cross picture
mMode = SVG;