r14795 - gnucash/trunk/src/app-utils - Make sure not to pass NULL to PERR() message macro

Christian Stimming cstim at cvs.gnucash.org
Mon Sep 4 12:27:32 EDT 2006


Author: cstim
Date: 2006-09-04 12:27:31 -0400 (Mon, 04 Sep 2006)
New Revision: 14795
Trac: http://svn.gnucash.org/trac/changeset/14795

Modified:
   gnucash/trunk/src/app-utils/gnc-ui-util.c
Log:
Make sure not to pass NULL to PERR() message macro

Modified: gnucash/trunk/src/app-utils/gnc-ui-util.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-ui-util.c	2006-09-04 08:11:30 UTC (rev 14794)
+++ gnucash/trunk/src/app-utils/gnc-ui-util.c	2006-09-04 16:27:31 UTC (rev 14795)
@@ -123,7 +123,7 @@
   else
   {
     if (safe_strcmp (choice, "credit") != 0)
-      PERR("bad value '%s'", choice);
+      PERR("bad value '%s'", choice ? choice : "(null)");
     reverse_type[ACCT_TYPE_LIABILITY] = TRUE;
     reverse_type[ACCT_TYPE_PAYABLE]   = TRUE;
     reverse_type[ACCT_TYPE_EQUITY]    = TRUE;



More information about the gnucash-changes mailing list