Fix bad qof_instance crash in dialog-payments

Just needed one more level of indirection.
Thanks to Mike Alexander for the report.
This commit is contained in:
John Ralls 2014-05-04 09:53:03 -07:00
parent 8cb391b308
commit edd85faad7

View File

@ -458,7 +458,7 @@ gnc_payment_dialog_owner_changed (PaymentWindow *pw)
pw->invoice = NULL; pw->invoice = NULL;
/* Now handle the account tree */ /* Now handle the account tree */
qof_instance_get (QOF_INSTANCE (owner), qof_instance_get (qofOwnerGetOwner (owner),
"payment-last-account", &guid, "payment-last-account", &guid,
NULL); NULL);
@ -506,17 +506,17 @@ gnc_payment_dialog_post_to_changed (PaymentWindow *pw)
static void static void
gnc_payment_dialog_remember_account (PaymentWindow *pw, Account *acc) gnc_payment_dialog_remember_account (PaymentWindow *pw, Account *acc)
{ {
GncOwner *owner = &pw->owner; QofInstance *owner = qofOwnerGetOwner (&pw->owner);
const GncGUID *guid; const GncGUID *guid;
if (!acc) return; if (!acc) return;
guid = xaccAccountGetGUID(acc); guid = xaccAccountGetGUID(acc);
qof_begin_edit (QOF_INSTANCE (owner)); qof_begin_edit (owner);
qof_instance_set (QOF_INSTANCE (owner), qof_instance_set (owner,
"payment-last-account", guid, "payment-last-account", guid,
NULL); NULL);
qof_commit_edit (QOF_INSTANCE (owner)); qof_commit_edit (owner);
} }