r15542 - gnucash/trunk/src/import-export/hbci - Avoid %s-printing of a NULL account name in a LEAVE message.

Andreas Köhler andi5 at cvs.gnucash.org
Fri Feb 9 18:34:32 EST 2007


Author: andi5
Date: 2007-02-09 18:34:30 -0500 (Fri, 09 Feb 2007)
New Revision: 15542
Trac: http://svn.gnucash.org/trac/changeset/15542

Modified:
   gnucash/trunk/src/import-export/hbci/gnc-plugin-hbci.c
Log:
Avoid %s-printing of a NULL account name in a LEAVE message.


Modified: gnucash/trunk/src/import-export/hbci/gnc-plugin-hbci.c
===================================================================
--- gnucash/trunk/src/import-export/hbci/gnc-plugin-hbci.c	2007-02-09 22:03:44 UTC (rev 15541)
+++ gnucash/trunk/src/import-export/hbci/gnc-plugin-hbci.c	2007-02-09 23:34:30 UTC (rev 15542)
@@ -327,6 +327,7 @@
   GncPluginPage  *page;
   const gchar    *page_name;
   Account        *account = NULL;
+  const gchar    *account_name;
 
   ENTER("main window %p", window);
   if (!GNC_IS_MAIN_WINDOW(window)) { LEAVE(""); }
@@ -351,7 +352,8 @@
   } else {
     account = NULL;
   }
-  LEAVE("account %s(%p)", xaccAccountGetName(account), account);
+  account_name = xaccAccountGetName (account);
+  LEAVE("account %s(%p)", account_name ? account_name : "(null)", account);
   return account;
 }
 



More information about the gnucash-changes mailing list