@@ -848,7 +848,10 @@ void QgsGrassPlugin::unload()
848
848
delete mNewVectorAction ;
849
849
850
850
if ( toolBarPointer )
851
+ {
851
852
delete toolBarPointer;
853
+ toolBarPointer = 0 ;
854
+ }
852
855
853
856
// disconnect slots of QgsGrassPlugin so they're not fired also after unload
854
857
disconnect ( mCanvas , SIGNAL ( renderComplete ( QPainter * ) ), this , SLOT ( postRender ( QPainter * ) ) );
@@ -864,20 +867,22 @@ void QgsGrassPlugin::unload()
864
867
void QgsGrassPlugin::setCurrentTheme ( QString theThemeName )
865
868
{
866
869
Q_UNUSED ( theThemeName );
870
+ if ( toolBarPointer )
871
+ {
872
+ mOpenMapsetAction ->setIcon ( getThemeIcon ( " grass_open_mapset.png" ) );
873
+ mNewMapsetAction ->setIcon ( getThemeIcon ( " grass_new_mapset.png" ) );
874
+ mCloseMapsetAction ->setIcon ( getThemeIcon ( " grass_close_mapset.png" ) );
867
875
868
- mOpenMapsetAction ->setIcon ( getThemeIcon ( " grass_open_mapset.png" ) );
869
- mNewMapsetAction ->setIcon ( getThemeIcon ( " grass_new_mapset.png" ) );
870
- mCloseMapsetAction ->setIcon ( getThemeIcon ( " grass_close_mapset.png" ) );
871
-
872
- mAddVectorAction ->setIcon ( getThemeIcon ( " grass_add_vector.png" ) );
873
- mAddRasterAction ->setIcon ( getThemeIcon ( " grass_add_raster.png" ) );
874
- mOpenToolsAction ->setIcon ( getThemeIcon ( " grass_tools.png" ) );
876
+ mAddVectorAction ->setIcon ( getThemeIcon ( " grass_add_vector.png" ) );
877
+ mAddRasterAction ->setIcon ( getThemeIcon ( " grass_add_raster.png" ) );
878
+ mOpenToolsAction ->setIcon ( getThemeIcon ( " grass_tools.png" ) );
875
879
876
- mRegionAction ->setIcon ( getThemeIcon ( " grass_region.png" ) );
880
+ mRegionAction ->setIcon ( getThemeIcon ( " grass_region.png" ) );
877
881
878
- mEditRegionAction ->setIcon ( getThemeIcon ( " grass_region_edit.png" ) );
879
- mEditAction ->setIcon ( getThemeIcon ( " grass_edit.png" ) );
880
- mNewVectorAction ->setIcon ( getThemeIcon ( " grass_new_vector_layer.png" ) );
882
+ mEditRegionAction ->setIcon ( getThemeIcon ( " grass_region_edit.png" ) );
883
+ mEditAction ->setIcon ( getThemeIcon ( " grass_edit.png" ) );
884
+ mNewVectorAction ->setIcon ( getThemeIcon ( " grass_new_vector_layer.png" ) );
885
+ }
881
886
}
882
887
883
888
// Note this code is duplicated from qgisapp.cpp because
0 commit comments