Skip to content

Commit e988374

Browse files
author
mhugent
committed
Workaround to make bug #2209 less likely
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12389 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 56b66d6 commit e988374

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/app/composer/qgscomposerpicturewidget.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,13 @@ void QgsComposerPictureWidget::addStandardDirectoriesToPreview()
462462

463463
bool QgsComposerPictureWidget::testSvgFile( const QString& filename ) const
464464
{
465+
//QSvgRenderer crashes with some (non-svg) xml documents.
466+
//So at least we try to sort out the ones with different suffixes
467+
if(!filename.endsWith(".svg"))
468+
{
469+
return false;
470+
}
471+
465472
QSvgRenderer svgRenderer( filename );
466473
if ( svgRenderer.isValid() )
467474
{

0 commit comments

Comments
 (0)