mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user