]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - contrib/meshtex/PluginUI.cpp
Merge commit '4ee1a6ee1ae75d52984e54e689ef1e587b384bcb' into master-merge
[xonotic/netradiant.git] / contrib / meshtex / PluginUI.cpp
index b0f6ad884e5a71c7edd09d128ab676815ded4214..fcbeef44e44a96b2e16ad01f216229b11bcd6a68 100644 (file)
@@ -36,6 +36,7 @@
  */
 PluginUI::PluginUI()
 {
+       PluginUI::singleton = this;
    // Instantiate and register the Set S/T Scale dialog. We need a non-generic
    // handle on this one too, because it will be used as input to the Get Info
    // dialog constructor below.
@@ -69,6 +70,7 @@ PluginUI::~PluginUI()
 {
 }
 
+PluginUI* PluginUI::singleton = 0;
 /**
  * Get the singleton instance of the UI manager. Note that callers should
  * almost certainly invoke the UIInstance global function instead of using
@@ -79,8 +81,11 @@ PluginUI::~PluginUI()
 PluginUI&
 PluginUI::Instance()
 {
-   static PluginUI singleton;
-   return singleton;
+   //static PluginUI singleton;
+   //return singleton;
+    if(!singleton)
+            singleton = new PluginUI();
+        return *singleton;
 }
 
 /**