We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56b66d6 commit e988374Copy full SHA for e988374
src/app/composer/qgscomposerpicturewidget.cpp
@@ -462,6 +462,13 @@ void QgsComposerPictureWidget::addStandardDirectoriesToPreview()
462
463
bool QgsComposerPictureWidget::testSvgFile( const QString& filename ) const
464
{
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
+
472
QSvgRenderer svgRenderer( filename );
473
if ( svgRenderer.isValid() )
474
0 commit comments