summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-10-28 17:34:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-10-28 17:34:49 +0000
commit162c8ddd463f17d84b7224219119f8acef6ce23d (patch)
tree0cbb4b0396b5fb92ad8e627069aa2c54161844fa /src/mir_app
parent5f5b12be632bffdd96181c0b3280b79227ed04f0 (diff)
fix for db_unset() calls over resident variables
git-svn-id: http://svn.miranda-ng.org/main/trunk@15637 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/mdatabasecache.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mir_app/src/mdatabasecache.cpp b/src/mir_app/src/mdatabasecache.cpp
index 82c5a54ef8..bddeecb750 100644
--- a/src/mir_app/src/mdatabasecache.cpp
+++ b/src/mir_app/src/mdatabasecache.cpp
@@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
#include "database.h"
+static DBVARIANT temp;
+
static int stringCompare(const char *p1, const char *p2)
{
return mir_strcmp(p1, p2);
@@ -185,7 +187,7 @@ STDMETHODIMP_(DBVARIANT*) MDatabaseCache::GetCachedValuePtr(MCONTACT contactID,
FreeCachedVariant(&V->value);
m_lGlobalSettings.remove(index);
HeapFree(m_hCacheHeap, 0, V);
- return NULL;
+ return &temp; // not null - smth were deleted
}
}
else {
@@ -245,7 +247,7 @@ STDMETHODIMP_(DBVARIANT*) MDatabaseCache::GetCachedValuePtr(MCONTACT contactID,
break;
}
HeapFree(m_hCacheHeap, 0, V);
- return NULL;
+ return &temp; // not null - smth were deleted
}
return &V->value;