mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 798585 - segfault running sample script
The root cause of which is that on recent releases of GLib (recent meaning 2.66 in the current Debian stable!) g_type_instance_get_private looks in the wrong place for the private data. When running the script in question it returned NULL and since the code didn't check for a valid pointer, it crashed. So this change replaces all calls to g_type_instance_get_private with the function [type_prefix]_get_instance_private() added in glib-2.36 except for two register2 files that have been removed from master; those are ignored to avoid unnecessary merge conflicts.
This commit is contained in:
@@ -171,7 +171,7 @@ try:
|
||||
invoice_customer.ApplyPayment(None, a6, GncNumeric(7,100),
|
||||
GncNumeric(1), datetime.date.today(), "", "")
|
||||
|
||||
vendor_bill_returns = book.BillLoookupByID("7")
|
||||
vendor_bill_returns = book.BillLookupByID("7")
|
||||
assert( vendor_bill_returns.GetID() == "7" )
|
||||
vendor_extract = vendor_bill_returns.GetOwner()
|
||||
assert( vendor_extract.GetName() == new_vendor.GetName() )
|
||||
|
||||
Reference in New Issue
Block a user