- // VZ: it seems that DeleteAll() wreaks havoc on NT. Disabled until I
- // investigate it further, do _not_ compile this code in meanwhile!
- // JACS: wxRegConfig::DeleteAll is disabled, so it's safe to call DeleteAll,
- // it just won't do anything useful on Win95/NT.
- if ( wxConfigBase::Get()->DeleteAll() ) {
- wxLogMessage("Config file/registry key successfully deleted.");
-
- delete wxConfigBase::Set((wxConfigBase *) NULL);
- wxConfigBase::DontCreateOnDemand();
- }
- else
- 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."));
+ }