Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix #4266 - georeferencer and spatial query crashing on exit
  • Loading branch information
wonder-sk committed Sep 6, 2011
1 parent 49e4e99 commit d5594b0
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
Expand Up @@ -80,7 +80,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 @@ -115,8 +116,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 @@ -131,6 +132,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
Expand Up @@ -99,6 +99,8 @@ void QgsSpatialQueryPlugin::unload()

delete mSpatialQueryAction;

delete mDialog;
mDialog = NULL;
}

void QgsSpatialQueryPlugin::run()
Expand Down

1 comment on commit d5594b0

@Jean-Roc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Martin, could you backport this change to 1.7.1 ?

Please sign in to comment.