diff --git a/pcbnew/import_gfx/dxf_import_plugin.h b/pcbnew/import_gfx/dxf_import_plugin.h index fb7b1541c8..e774ed2c8b 100644 --- a/pcbnew/import_gfx/dxf_import_plugin.h +++ b/pcbnew/import_gfx/dxf_import_plugin.h @@ -148,7 +148,8 @@ public: const wxArrayString GetFileExtensions() const override { - return wxArrayString( 1, formatWildcardExt( "dxf" ) ); + static wxString wildcardExt = formatWildcardExt( "dxf" ); + return wxArrayString( 1, &wildcardExt ); } bool Load( const wxString& aFileName ) override; diff --git a/pcbnew/import_gfx/svg_import_plugin.h b/pcbnew/import_gfx/svg_import_plugin.h index bbd441cdc6..78e49b8b35 100644 --- a/pcbnew/import_gfx/svg_import_plugin.h +++ b/pcbnew/import_gfx/svg_import_plugin.h @@ -45,8 +45,8 @@ public: const wxArrayString GetFileExtensions() const override { - - return wxArrayString( 1, formatWildcardExt( "svg" ) ); + static wxString wildcardExt = formatWildcardExt( "svg" ); + return wxArrayString( 1, &wildcardExt ); } /**