Skip to content

Commit

Permalink
fix instant crash on windows again (followup dc3b56a and 9d8d317)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Oct 11, 2013
1 parent 58b7199 commit 9e6e62d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
#include "qgsmessagelog.h"


QgsEditorWidgetRegistry QgsEditorWidgetRegistry::sInstance;
QgsEditorWidgetRegistry *QgsEditorWidgetRegistry::sInstance = 0;

QgsEditorWidgetRegistry* QgsEditorWidgetRegistry::instance()
{
return &sInstance;
if ( !sInstance )
sInstance = new QgsEditorWidgetRegistry();
return sInstance;
}

QgsEditorWidgetRegistry::QgsEditorWidgetRegistry()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/core/qgseditorwidgetregistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject

private:
QMap<QString, QgsEditorWidgetFactory*> mWidgetFactories;
static QgsEditorWidgetRegistry sInstance;
static QgsEditorWidgetRegistry *sInstance;
};


Expand Down

0 comments on commit 9e6e62d

Please sign in to comment.