r15941 - gnucash/trunk/src/app-utils - Only append if the list is valid.
Josh Sled
jsled at cvs.gnucash.org
Fri Apr 20 12:56:11 EDT 2007
Author: jsled
Date: 2007-04-20 12:56:10 -0400 (Fri, 20 Apr 2007)
New Revision: 15941
Trac: http://svn.gnucash.org/trac/changeset/15941
Modified:
gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
Log:
Only append if the list is valid.
Modified: gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-sx-instance-model.c 2007-04-20 15:34:58 UTC (rev 15940)
+++ gnucash/trunk/src/app-utils/gnc-sx-instance-model.c 2007-04-20 16:56:10 UTC (rev 15941)
@@ -902,7 +902,8 @@
g_string_printf(err, "Null account kvp value for SX [%s], cancelling creation.",
xaccSchedXactionGetName(instance->parent->sx));
g_critical("%s", err->str);
- *creation_errors = g_list_append(*creation_errors, err);
+ if (creation_errors != NULL)
+ *creation_errors = g_list_append(*creation_errors, err);
return FALSE;
}
acct_guid = kvp_value_get_guid( kvp_val );
@@ -916,7 +917,9 @@
g_string_printf(err, "Unknown account for guid [%s], cancelling SX [%s] creation.",
guid_str, xaccSchedXactionGetName(instance->parent->sx));
g_free((char*)guid_str);
- *creation_errors = g_list_append(*creation_errors, err);
+ g_critical("%s", err->str);
+ if (creation_errors != NULL)
+ *creation_errors = g_list_append(*creation_errors, err);
return FALSE;
}
@@ -951,7 +954,8 @@
formula_str,
parseErrorLoc,
gnc_exp_parser_error_string());
- *creation_errors = g_list_append(*creation_errors, err);
+ if (creation_errors != NULL)
+ *creation_errors = g_list_append(*creation_errors, err);
}
if (parser_vars != NULL)
More information about the gnucash-changes
mailing list