Allow NULL pointers when calling xaccAccountGetFullName. Fixes #432314.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15987 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2007-04-22 18:30:48 +00:00
parent 4c34eadeda
commit 14da30d2bf

View File

@@ -2774,8 +2774,14 @@ xaccAccountGetFullName(const Account *account)
gchar **names;
int level;
/* So much for hardening the API. Too many callers to this function don't
* bother to check if they have a non-NULL pointer before calling. */
if (NULL == account)
return g_strdup("");
/* errors */
g_return_val_if_fail(GNC_IS_ACCOUNT(account), g_strdup(""));
/* optimizations */
priv = GET_PRIVATE(account);
if (!priv->parent)