Index: runtime/platforms/win/kwinstartmenu/winstartmenu.cpp
===================================================================
--- runtime/platforms/win/kwinstartmenu/winstartmenu.cpp	(wersja 797447)
+++ runtime/platforms/win/kwinstartmenu/winstartmenu.cpp	(kopia robocza)
@@ -24,6 +24,7 @@
 #include "misc.h"
 
 #include <kconfig.h>
+#include <kconfiggroup.h>
 #include <kdebug.h>
 #include <kpluginfactory.h>
 #include <kpluginloader.h>
@@ -38,22 +39,30 @@
 
 struct WinStartMenuModulePrivate
 {
+    WinStartMenuModulePrivate()
+     : config("kwinstartmenurc")
+     , ksycoca(0)
+    {
+    }
     virtual ~WinStartMenuModulePrivate() 
     { 
-        delete config; 
         delete ksycoca;
     }
 
-    KConfig *config;
+    KConfig config;
     KSycoca *ksycoca;
 };
 
 WinStartMenuModule::WinStartMenuModule(QObject* parent, const QList<QVariant>&)
     : KDEDModule(parent)
+    , d( new WinStartMenuModulePrivate )
 {
-    QString profile = qgetenv("ALLUSERSPROFILE");
+    KConfigGroup group( &d->config, "General" );
+    if (!group.readEntry("Enabled", true))
+      return;
+
+    //QString profile = qgetenv("ALLUSERSPROFILE");
     
-    d = new WinStartMenuModulePrivate;
     // not used yet
     //d->config = new KConfig(KStandardDirs::locateLocal("data", "winstartrc"));
     d->ksycoca = new KSycoca();
@@ -64,7 +73,8 @@
 
 WinStartMenuModule::~WinStartMenuModule()
 {
-    disconnect(d->ksycoca, SIGNAL(databaseChanged()), this, SLOT(databaseChanged()));
+    if (d->ksycoca)
+      disconnect(d->ksycoca, SIGNAL(databaseChanged()), this, SLOT(databaseChanged()));
     delete d;
 }
 
