diff --git a/src/backend/file/gnc-account-xml-v2.c b/src/backend/file/gnc-account-xml-v2.c index 23bd685d46..5a2715c1c6 100644 --- a/src/backend/file/gnc-account-xml-v2.c +++ b/src/backend/file/gnc-account-xml-v2.c @@ -188,6 +188,8 @@ account_id_handler (xmlNodePtr node, gpointer act_pdata) GUID *guid; guid = dom_tree_to_guid(node); + g_return_val_if_fail(guid, FALSE); + xaccAccountSetGUID(pdata->account, guid); g_free(guid); diff --git a/src/backend/file/gnc-transaction-xml-v2.c b/src/backend/file/gnc-transaction-xml-v2.c index f3ab633df0..a36519d2c1 100644 --- a/src/backend/file/gnc-transaction-xml-v2.c +++ b/src/backend/file/gnc-transaction-xml-v2.c @@ -307,7 +307,7 @@ spl_account_handler(xmlNodePtr node, gpointer data) GUID *id = dom_tree_to_guid(node); Account *account; - if (!id) return FALSE; + g_return_val_if_fail(id, FALSE); account = xaccAccountLookup (id, pdata->book); if (!account && gnc_transaction_xml_v2_testing && @@ -333,7 +333,7 @@ spl_lot_handler(xmlNodePtr node, gpointer data) GUID *id = dom_tree_to_guid(node); GNCLot *lot; - if (!id) return FALSE; + g_return_val_if_fail(id, FALSE); lot = gnc_lot_lookup (id, pdata->book); if (!lot && gnc_transaction_xml_v2_testing &&