Skip to content

Commit

Permalink
Workaround to make bug #2209 less likely
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12389 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 9, 2009
1 parent 40a35f7 commit 0c462e8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/composer/qgscomposerpicturewidget.cpp
Expand Up @@ -462,6 +462,13 @@ void QgsComposerPictureWidget::addStandardDirectoriesToPreview()

bool QgsComposerPictureWidget::testSvgFile( const QString& filename ) const
{
//QSvgRenderer crashes with some (non-svg) xml documents.
//So at least we try to sort out the ones with different suffixes
if(!filename.endsWith(".svg"))
{
return false;
}

QSvgRenderer svgRenderer( filename );
if ( svgRenderer.isValid() )
{
Expand Down

0 comments on commit 0c462e8

Please sign in to comment.