File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -145,15 +145,21 @@ void QgsCompassPlugin::unload()
145
145
mQGisIface ->removePluginMenu ( sName , mActionAboutCompass );
146
146
147
147
delete mActionRunCompass ;
148
+ mActionRunCompass = 0 ;
148
149
delete mActionAboutCompass ;
150
+ mActionAboutCompass = 0 ;
149
151
delete mDock ;
152
+ mDock = 0 ;
150
153
}
151
154
152
155
// ! Set icons to the current theme
153
156
void QgsCompassPlugin::setCurrentTheme ( QString )
154
157
{
155
- mActionRunCompass ->setIcon ( getThemeIcon ( " /mCompassRun.png" ) );
156
- mActionAboutCompass ->setIcon ( getThemeIcon ( " /mActionAbout.png" ) );
158
+ if ( mActionRunCompass && mActionAboutCompass )
159
+ {
160
+ mActionRunCompass ->setIcon ( getThemeIcon ( " /mCompassRun.png" ) );
161
+ mActionAboutCompass ->setIcon ( getThemeIcon ( " /mActionAbout.png" ) );
162
+ }
157
163
}
158
164
159
165
QIcon QgsCompassPlugin::getThemeIcon ( const QString &theName )
You can’t perform that action at this time.
0 commit comments