@@ -115,6 +115,7 @@ void dxf2shpConverter::unload()
115
115
mQGisIface ->removePluginVectorMenu ( tr ( " &Dxf2Shp" ), mQActionPointer );
116
116
mQGisIface ->removeVectorToolBarIcon ( mQActionPointer );
117
117
delete mQActionPointer ;
118
+ mQActionPointer = 0 ;
118
119
}
119
120
120
121
void dxf2shpConverter::addMyLayer ( QString myfname, QString mytitle )
@@ -129,21 +130,24 @@ void dxf2shpConverter::setCurrentTheme( QString theThemeName )
129
130
QString myCurThemePath = QgsApplication::activeThemePath () + " /plugins/dxf2shp_converter.png" ;
130
131
QString myDefThemePath = QgsApplication::defaultThemePath () + " /plugins/dxf2shp_converter.png" ;
131
132
QString myQrcPath = " :/dxf2shp_converter.png" ;
132
- if ( QFile::exists ( myCurThemePath ) )
133
+ if ( mQActionPointer )
133
134
{
134
- mQActionPointer ->setIcon ( QIcon ( myCurThemePath ) );
135
- }
136
- else if ( QFile::exists ( myDefThemePath ) )
137
- {
138
- mQActionPointer ->setIcon ( QIcon ( myDefThemePath ) );
139
- }
140
- else if ( QFile::exists ( myQrcPath ) )
141
- {
142
- mQActionPointer ->setIcon ( QIcon ( myQrcPath ) );
143
- }
144
- else
145
- {
146
- mQActionPointer ->setIcon ( QIcon () );
135
+ if ( QFile::exists ( myCurThemePath ) )
136
+ {
137
+ mQActionPointer ->setIcon ( QIcon ( myCurThemePath ) );
138
+ }
139
+ else if ( QFile::exists ( myDefThemePath ) )
140
+ {
141
+ mQActionPointer ->setIcon ( QIcon ( myDefThemePath ) );
142
+ }
143
+ else if ( QFile::exists ( myQrcPath ) )
144
+ {
145
+ mQActionPointer ->setIcon ( QIcon ( myQrcPath ) );
146
+ }
147
+ else
148
+ {
149
+ mQActionPointer ->setIcon ( QIcon () );
150
+ }
147
151
}
148
152
}
149
153
0 commit comments