- // VZ: it seems that DeleteAll() wreaks havoc on NT. Disabled until I
- // investigate it further, do _not_ compile this code in meanwhile!
-#if 0
- if ( wxConfigBase::Get()->DeleteAll() ) {
- wxLogMessage("Config file/registry key successfully deleted.");
-
- delete wxConfigBase::Set((wxConfigBase *) NULL);
- wxConfigBase::DontCreateOnDemand();
- }
- else
-#endif // 0
- wxLogError("Deleting config file/registry key failed.");
+ wxConfigBase *pConfig = wxConfigBase::Get();
+ if ( pConfig == NULL )
+ {
+ wxLogError(_T("No config to delete!"));
+ return;
+ }
+
+ if ( pConfig->DeleteAll() )
+ {
+ wxLogMessage(_T("Config file/registry key successfully deleted."));
+
+ delete wxConfigBase::Set(NULL);
+ wxConfigBase::DontCreateOnDemand();
+ }
+ else
+ {
+ wxLogError(_T("Deleting config file/registry key failed."));
+ }