fix UI initialization, it runs, baby\!
[duncan/yast2-web-wt.git] / src / Y2CCWeb.h
index bf08663..bfbed5f 100644 (file)
@@ -50,10 +50,17 @@ public:
      */
     Y2Component *create(const char * name) const
     {
-       if (!strcmp(name, "web") )
-           return new YWebUIComponent();
-       else
-           return 0;
+        if (!strcmp(name, "web") )
+        {
+            Y2Component* ret = YUIComponent::uiComponent ();
+            if (!ret || ret->name () != name)
+            {
+                ret = new YWebUIComponent();
+            }
+            return ret;
+        }
+        else
+            return 0;
     }
 };