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 authored and timlinux committed Sep 6, 2013
1 parent 3a6464d commit 58cfc7f
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 58cfc7f

Please sign in to comment.