diff options
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/mdatabasecache.cpp | 6 |
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;
|