diff --git a/libgnucash/engine/qof-string-cache.cpp b/libgnucash/engine/qof-string-cache.cpp index 68e4fe479c..eb236ebd0e 100644 --- a/libgnucash/engine/qof-string-cache.cpp +++ b/libgnucash/engine/qof-string-cache.cpp @@ -84,7 +84,7 @@ qof_string_cache_destroy (void) void qof_string_cache_remove(const char * key) { - if (key) + if (key && key[0] != 0) { GHashTable* cache = qof_get_string_cache(); gpointer value; @@ -111,6 +111,11 @@ qof_string_cache_insert(const char * key) { if (key) { + if (key[0] == 0) + { + return ""; + } + GHashTable* cache = qof_get_string_cache(); gpointer value; gpointer cache_key;