Skip to content
Permalink
Browse files

Fix #4266 - georeferencer and spatial query crashing on exit

  • Loading branch information
wonder-sk authored and timlinux committed Sep 7, 2011
1 parent 871173d commit f277a84023a94b0a5f9eb9f5784529273cec5a11
@@ -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 )
{
}

@@ -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();
}
@@ -133,6 +134,9 @@ void QgsGeorefPlugin::unload()

delete mActionRunGeoref;
delete mActionAbout;

delete mPluginGui;
mPluginGui = NULL;
}

//! Set icons to the current theme
@@ -100,6 +100,8 @@ void QgsSpatialQueryPlugin::unload()

delete mSpatialQueryAction;

delete mDialog;
mDialog = NULL;
}

void QgsSpatialQueryPlugin::run()

0 comments on commit f277a84

Please sign in to comment.
You can’t perform that action at this time.