File tree 1 file changed +18
-14
lines changed
1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ void QgsSpitPlugin::unload()
93
93
qI->removeDatabaseToolBarIcon ( spitAction );
94
94
qI->removePluginDatabaseMenu ( tr ( " &Spit" ), spitAction );
95
95
delete spitAction;
96
+ spitAction = 0 ;
96
97
}
97
98
98
99
// ! Set icons to the current theme
@@ -102,21 +103,24 @@ void QgsSpitPlugin::setCurrentTheme( QString theThemeName )
102
103
QString myCurThemePath = QgsApplication::activeThemePath () + " /plugins/spit.png" ;
103
104
QString myDefThemePath = QgsApplication::defaultThemePath () + " /plugins/spit.png" ;
104
105
QString myQrcPath = " :/spit.png" ;
105
- if ( QFile::exists ( myCurThemePath ) )
106
+ if ( spitAction )
106
107
{
107
- spitAction->setIcon ( QIcon ( myCurThemePath ) );
108
- }
109
- else if ( QFile::exists ( myDefThemePath ) )
110
- {
111
- spitAction->setIcon ( QIcon ( myDefThemePath ) );
112
- }
113
- else if ( QFile::exists ( myQrcPath ) )
114
- {
115
- spitAction->setIcon ( QIcon ( myQrcPath ) );
116
- }
117
- else
118
- {
119
- spitAction->setIcon ( QIcon () );
108
+ if ( QFile::exists ( myCurThemePath ) )
109
+ {
110
+ spitAction->setIcon ( QIcon ( myCurThemePath ) );
111
+ }
112
+ else if ( QFile::exists ( myDefThemePath ) )
113
+ {
114
+ spitAction->setIcon ( QIcon ( myDefThemePath ) );
115
+ }
116
+ else if ( QFile::exists ( myQrcPath ) )
117
+ {
118
+ spitAction->setIcon ( QIcon ( myQrcPath ) );
119
+ }
120
+ else
121
+ {
122
+ spitAction->setIcon ( QIcon () );
123
+ }
120
124
}
121
125
}
122
126
You can’t perform that action at this time.
0 commit comments