From d398e9959386b5b986551b83c5952a7141ea550d Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sat, 12 Feb 2011 15:53:51 +0000 Subject: [PATCH] Another error message somewhat more verbose. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20282 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/Query.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engine/Query.c b/src/engine/Query.c index 46f9d2cbd6..5c0fa13012 100644 --- a/src/engine/Query.c +++ b/src/engine/Query.c @@ -273,6 +273,12 @@ xaccQueryAddAccountGUIDMatch(QofQuery *q, AccountGUIDList *guid_list, 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;