Skip to content

Commit

Permalink
Fix #4266 - georeferencer and spatial query crashing on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk authored and timlinux committed Sep 7, 2011
1 parent 871173d commit f277a84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/plugins/georeferencer/qgsgeorefplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ static const QString sPluginIcon = ":/icons/mGeorefRun.png";
*/
QgsGeorefPlugin::QgsGeorefPlugin( QgisInterface * theQgisInterface ):
QgisPlugin( sName, sDescription, sPluginVersion, sPluginType ),
mQGisIface( theQgisInterface )
mQGisIface( theQgisInterface ),
mPluginGui( NULL )
{
}

Expand Down Expand Up @@ -117,8 +118,8 @@ void QgsGeorefPlugin::initGui()
// Slot called when the buffer menu item is triggered
void QgsGeorefPlugin::run()
{
mPluginGui = new QgsGeorefPluginGui( mQGisIface, mQGisIface->mainWindow() );
mPluginGui->setAttribute( Qt::WA_DeleteOnClose );
if ( !mPluginGui )
mPluginGui = new QgsGeorefPluginGui( mQGisIface, mQGisIface->mainWindow() );
mPluginGui->show();
mPluginGui->setFocus();
}
Expand All @@ -133,6 +134,9 @@ void QgsGeorefPlugin::unload()

delete mActionRunGeoref;
delete mActionAbout;

delete mPluginGui;
mPluginGui = NULL;
}

//! Set icons to the current theme
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/spatialquery/qgsspatialqueryplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ void QgsSpatialQueryPlugin::unload()

delete mSpatialQueryAction;

delete mDialog;
mDialog = NULL;
}

void QgsSpatialQueryPlugin::run()
Expand Down

0 comments on commit f277a84

Please sign in to comment.