]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/registry.cpp
Partially applied patch [ 763900 ] fix for vertical toolbar
[wxWidgets.git] / src / msw / registry.cpp
index c0f5e6a304755f88785cfadecd584d8289531def..c9111fbda56b84aa30b5f829dcc1dcdaed02d5fb 100644 (file)
@@ -682,7 +682,10 @@ bool wxRegKey::DeleteValue(const wxChar *szValue)
 
 #if defined(__WIN32__)
     m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue);
 
 #if defined(__WIN32__)
     m_dwLastError = RegDeleteValue((HKEY) m_hKey, WXSTRINGCAST szValue);
-    if ( m_dwLastError != ERROR_SUCCESS ) {
+
+    // deleting a value which doesn't exist is not considered an error
+    if ( (m_dwLastError != ERROR_SUCCESS) &&
+         (m_dwLastError != ERROR_FILE_NOT_FOUND) ) {
       wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"),
                     szValue, GetName().c_str());
       return FALSE;
       wxLogSysError(m_dwLastError, _("Can't delete value '%s' from key '%s'"),
                     szValue, GetName().c_str());
       return FALSE;