* src/engine/qofinstance.c: return a "valid" GUID even if passed a NULL

object, because lots of code assumes you can get a guid all the time.
	  So, just return guid_null() instead of NULL.  Fixes a SEGV.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9742 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2004-01-01 18:20:33 +00:00
parent bf4a63ca3b
commit 497402dbaf
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-01-01 Derek Atkins <derek@ihtfp.com>
* src/engine/qofinstance.c: return a "valid" GUID even if passed a NULL
object, because lots of code assumes you can get a guid all the time.
So, just return guid_null() instead of NULL. Fixes a SEGV.
2003-12-23 Christian Stimming <stimming@tuhh.de>
* src/engine/gnc-trace.c: Patch enabling compilation on Mac OS X

View File

@ -69,7 +69,7 @@ qof_instance_release (QofInstance *inst)
const GUID *
qof_instance_get_guid (QofInstance *inst)
{
if (!inst) return NULL;
if (!inst) return guid_null(); /* some callers depend on a real return value */
return &inst->entity.guid;
}