Skip to content
Permalink
Browse files

fix crash in Dxf2Shp plugin

  • Loading branch information
slarosa committed Sep 4, 2013
1 parent fbf8225 commit 0ff634158f376f8ff7acb698a526da07dac6107c
Showing with 18 additions and 14 deletions.
  1. +18 −14 src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
@@ -115,6 +115,7 @@ void dxf2shpConverter::unload()
mQGisIface->removePluginVectorMenu( tr( "&Dxf2Shp" ), mQActionPointer );
mQGisIface->removeVectorToolBarIcon( mQActionPointer );
delete mQActionPointer;
mQActionPointer = 0;
}

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

0 comments on commit 0ff6341

Please sign in to comment.
You can’t perform that action at this time.