File tree 2 files changed +5
-0
lines changed
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -3655,6 +3655,9 @@ QStringList QgsSymbolLayerUtils::listSvgFilesAt( const QString &directory )
3655
3655
3656
3656
QString QgsSymbolLayerUtils::svgSymbolNameToPath ( QString name, const QgsPathResolver &pathResolver )
3657
3657
{
3658
+ if ( name.isEmpty () )
3659
+ return QString ();
3660
+
3658
3661
// we might have a full path...
3659
3662
if ( QFileInfo::exists ( name ) )
3660
3663
return QFileInfo ( name ).canonicalFilePath ();
Original file line number Diff line number Diff line change @@ -211,6 +211,8 @@ void TestQgsProject::testPathResolverSvg()
211
211
QString dataDir ( TEST_DATA_DIR ); // defined in CmakeLists.txt
212
212
QString layerPath = dataDir + " /points.shp" ;
213
213
214
+ QVERIFY ( QgsSymbolLayerUtils::svgSymbolNameToPath ( QString (), QgsPathResolver () ).isEmpty () );
215
+
214
216
// build a project with 3 layers, each having a simple renderer with SVG marker
215
217
// - existing SVG file in project dir
216
218
// - existing SVG file in QGIS dir
You can’t perform that action at this time.
0 commit comments