r20282 - gnucash/trunk/src/engine - Another error message somewhat more verbose.

Christian Stimming cstim at code.gnucash.org
Sat Feb 12 10:53:51 EST 2011


Author: cstim
Date: 2011-02-12 10:53:51 -0500 (Sat, 12 Feb 2011)
New Revision: 20282
Trac: http://svn.gnucash.org/trac/changeset/20282

Modified:
   gnucash/trunk/src/engine/Query.c
Log:
Another error message somewhat more verbose.

Modified: gnucash/trunk/src/engine/Query.c
===================================================================
--- gnucash/trunk/src/engine/Query.c	2011-02-12 15:53:37 UTC (rev 20281)
+++ gnucash/trunk/src/engine/Query.c	2011-02-12 15:53:51 UTC (rev 20282)
@@ -273,6 +273,12 @@
 
     if (!q) return;
 
+    if (!guid_list && how != QOF_GUID_MATCH_NULL)
+    {
+        g_warning("Got a NULL guid_list but the QofGuidMatch is not MATCH_NULL (but instead %d). In other words, the list of GUID matches is empty but it must contain something non-empty.", how);
+        /* qof_query_guid_predicate() would trigger a g_warning as well */
+        return;
+    }
     pred_data = qof_query_guid_predicate (how, guid_list);
     if (!pred_data)
         return;



More information about the gnucash-changes mailing list