gnucash trunk: Fix bad qof_instance crash in dialog-payments
John Ralls
jralls at code.gnucash.org
Mon May 5 00:07:10 EDT 2014
Updated via https://github.com/Gnucash/gnucash/commit/edd85faa (commit)
from https://github.com/Gnucash/gnucash/commit/8cb391b3 (commit)
commit edd85faad75055231cc58779d2c677fc61cc9492
Author: John Ralls <jralls at ceridwen.us>
Date: Sun May 4 09:53:03 2014 -0700
Fix bad qof_instance crash in dialog-payments
Just needed one more level of indirection.
Thanks to Mike Alexander for the report.
diff --git a/src/business/business-gnome/dialog-payment.c b/src/business/business-gnome/dialog-payment.c
index 151f678..ae6e0a7 100644
--- a/src/business/business-gnome/dialog-payment.c
+++ b/src/business/business-gnome/dialog-payment.c
@@ -458,7 +458,7 @@ gnc_payment_dialog_owner_changed (PaymentWindow *pw)
pw->invoice = NULL;
/* Now handle the account tree */
- qof_instance_get (QOF_INSTANCE (owner),
+ qof_instance_get (qofOwnerGetOwner (owner),
"payment-last-account", &guid,
NULL);
@@ -506,17 +506,17 @@ gnc_payment_dialog_post_to_changed (PaymentWindow *pw)
static void
gnc_payment_dialog_remember_account (PaymentWindow *pw, Account *acc)
{
- GncOwner *owner = &pw->owner;
+ QofInstance *owner = qofOwnerGetOwner (&pw->owner);
const GncGUID *guid;
if (!acc) return;
guid = xaccAccountGetGUID(acc);
- qof_begin_edit (QOF_INSTANCE (owner));
- qof_instance_set (QOF_INSTANCE (owner),
+ qof_begin_edit (owner);
+ qof_instance_set (owner,
"payment-last-account", guid,
NULL);
- qof_commit_edit (QOF_INSTANCE (owner));
+ qof_commit_edit (owner);
}
Summary of changes:
src/business/business-gnome/dialog-payment.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list