Skip to content

Commit

Permalink
fix crash in Compass plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Sep 5, 2013
1 parent 37a20f4 commit 3896c73
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/plugins/compass/qgscompassplugin.cpp
Expand Up @@ -145,15 +145,21 @@ void QgsCompassPlugin::unload()
mQGisIface->removePluginMenu( sName, mActionAboutCompass );

delete mActionRunCompass;
mActionRunCompass = 0;
delete mActionAboutCompass;
mActionAboutCompass = 0;
delete mDock;
mDock = 0;
}

//! Set icons to the current theme
void QgsCompassPlugin::setCurrentTheme( QString )
{
mActionRunCompass->setIcon( getThemeIcon( "/mCompassRun.png" ) );
mActionAboutCompass->setIcon( getThemeIcon( "/mActionAbout.png" ) );
if ( mActionRunCompass && mActionAboutCompass )
{
mActionRunCompass->setIcon( getThemeIcon( "/mCompassRun.png" ) );
mActionAboutCompass->setIcon( getThemeIcon( "/mActionAbout.png" ) );
}
}

QIcon QgsCompassPlugin::getThemeIcon( const QString &theName )
Expand Down

0 comments on commit 3896c73

Please sign in to comment.