Skip to content

Commit

Permalink
Move static variable to function scope
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Oct 20, 2017
1 parent 08443c2 commit e59f1d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsproviderregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ typedef QString protocolDrivers_t();
//typedef int dataCapabilities_t();
//typedef QgsDataItem * dataItem_t(QString);

static QMutex mutex;
static QgsProviderRegistry *sInstance = nullptr;

QgsProviderRegistry *QgsProviderRegistry::instance( const QString &pluginPath )
{
if ( !sInstance )
{
QMutexLocker locker( &mutex );
static QMutex sMutex;
QMutexLocker locker( &sMutex );
if ( !sInstance )
{
sInstance = new QgsProviderRegistry( pluginPath );
Expand Down

0 comments on commit e59f1d5

Please sign in to comment.