Skip to content
Permalink
Browse files
Delete provider registry actively
Fixes a crash on exit
  • Loading branch information
m-kuhn committed May 12, 2014
1 parent 156dc55 commit 248dffab282ce04e49cfbdc4d6fb1b71eda4f14c
Showing with 4 additions and 2 deletions.
  1. +2 −0 src/core/qgsapplication.cpp
  2. +2 −2 src/core/qgsproviderregistry.cpp
@@ -595,6 +595,8 @@ void QgsApplication::initQgis()
void QgsApplication::exitQgis()
{
delete QgsMapLayerRegistry::instance();

delete QgsProviderRegistry::instance();
}

QString QgsApplication::showSettings()
@@ -47,8 +47,8 @@ typedef QString protocolDrivers_t();

QgsProviderRegistry *QgsProviderRegistry::instance( QString pluginPath )
{
static QgsProviderRegistry mInstance( pluginPath );
return &mInstance;
static QgsProviderRegistry* sInstance( new QgsProviderRegistry( pluginPath ) );
return sInstance;
} // QgsProviderRegistry::instance


0 comments on commit 248dffa

Please sign in to comment.