From a2269e623ebaab0597384f09e3ab2b28aa0a47f2 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sat, 7 Apr 2007 18:24:53 +0000 Subject: [PATCH] Fix compiler complaints about dereferencing type-punned pointers. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15849 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/business/business-core/gncInvoice.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/business/business-core/gncInvoice.c b/src/business/business-core/gncInvoice.c index fb839aec2d..2a3e3339ee 100644 --- a/src/business/business-core/gncInvoice.c +++ b/src/business/business-core/gncInvoice.c @@ -484,15 +484,21 @@ GncOwner * gncInvoiceGetOwner (GncInvoice *invoice) static QofInstance* qofInvoiceGetOwner (GncInvoice *invoice) { + GncOwner *owner; + if(!invoice) { return NULL; } - return QOF_INSTANCE(&invoice->owner); + owner = &invoice->owner; + return QOF_INSTANCE(owner); } static QofInstance* qofInvoiceGetBillTo (GncInvoice *invoice) { + GncOwner *billto; + if(!invoice) { return NULL; } - return QOF_INSTANCE(&invoice->billto); + billto = &invoice->billto; + return QOF_INSTANCE(billto); } Timespec gncInvoiceGetDateOpened (GncInvoice *invoice)