summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap/src/dbsettings.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbsettings.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp
index 4e444eaa67..76122610f9 100644
--- a/plugins/Db3x_mmap/src/dbsettings.cpp
+++ b/plugins/Db3x_mmap/src/dbsettings.cpp
@@ -770,9 +770,15 @@ STDMETHODIMP_(BOOL) CDb3Mmap::DeleteContactSetting(MCONTACT contactID, LPCSTR sz
}
DBMoveChunk(ofsSettingToCut, ofsSettingToCut + nameLen + valLen, ofsBlobPtr + 1 - ofsSettingToCut);
DBFlush(1);
- }
- m_cache->GetCachedValuePtr(saveContact, szCachedSettingName, -1);
+ // remove a value from cache anyway
+ m_cache->GetCachedValuePtr(saveContact, szCachedSettingName, -1);
+ }
+ else { // resident variable
+ // if a value doesn't exist, simply return error
+ if (m_cache->GetCachedValuePtr(saveContact, szCachedSettingName, -1) == NULL)
+ return 1;
+ }
}
// notify