Skip to content

Commit

Permalink
fix crash in Dxf2Shp plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Sep 4, 2013
1 parent fbf8225 commit 0ff6341
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
Expand Up @@ -115,6 +115,7 @@ void dxf2shpConverter::unload()
mQGisIface->removePluginVectorMenu( tr( "&Dxf2Shp" ), mQActionPointer ); mQGisIface->removePluginVectorMenu( tr( "&Dxf2Shp" ), mQActionPointer );
mQGisIface->removeVectorToolBarIcon( mQActionPointer ); mQGisIface->removeVectorToolBarIcon( mQActionPointer );
delete mQActionPointer; delete mQActionPointer;
mQActionPointer = 0;
} }


void dxf2shpConverter::addMyLayer( QString myfname, QString mytitle ) void dxf2shpConverter::addMyLayer( QString myfname, QString mytitle )
Expand All @@ -129,21 +130,24 @@ void dxf2shpConverter::setCurrentTheme( QString theThemeName )
QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/dxf2shp_converter.png"; QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/dxf2shp_converter.png";
QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/dxf2shp_converter.png"; QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/dxf2shp_converter.png";
QString myQrcPath = ":/dxf2shp_converter.png"; QString myQrcPath = ":/dxf2shp_converter.png";
if ( QFile::exists( myCurThemePath ) ) if ( mQActionPointer )
{ {
mQActionPointer->setIcon( QIcon( myCurThemePath ) ); if ( QFile::exists( myCurThemePath ) )
} {
else if ( QFile::exists( myDefThemePath ) ) mQActionPointer->setIcon( QIcon( myCurThemePath ) );
{ }
mQActionPointer->setIcon( QIcon( myDefThemePath ) ); else if ( QFile::exists( myDefThemePath ) )
} {
else if ( QFile::exists( myQrcPath ) ) mQActionPointer->setIcon( QIcon( myDefThemePath ) );
{ }
mQActionPointer->setIcon( QIcon( myQrcPath ) ); else if ( QFile::exists( myQrcPath ) )
} {
else mQActionPointer->setIcon( QIcon( myQrcPath ) );
{ }
mQActionPointer->setIcon( QIcon() ); else
{
mQActionPointer->setIcon( QIcon() );
}
} }
} }


Expand Down

0 comments on commit 0ff6341

Please sign in to comment.