[goffice] Fix #584772



commit bfc0fe56e8d84868eac39fd8bfb7b2a1ed32cd1e
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Wed Jun 3 16:46:36 2009 -0600

    Fix #584772
    
    2009-06-03  Andreas J. Guelzow  <aguelzow pyrshep ca>
    
    	* goffice/utils/go-format.c (go_format_output_currency_to_odf):
    	  account for the possibility of NULL currency
---
 ChangeLog                 |    5 +++++
 goffice/utils/go-format.c |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7378e2a..9dfc0fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-06-03  Andreas J. Guelzow  <aguelzow pyrshep ca>
+
+	* goffice/utils/go-format.c (go_format_output_currency_to_odf):
+	  account for the possibility of NULL currency
+	
 2009-06-02  Andreas J. Guelzow  <aguelzow pyrshep ca>
 
 	* goffice/utils/go-format.c (go_format_output_number_to_odf):
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index 0956cc8..d136b83 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -6126,7 +6126,7 @@ go_format_output_currency_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 	}
 	if (parentheses)
 		gsf_xml_out_simple_element(xout, NUMBER "text", "(");
-	if (details->currency->precedes) {
+	if ((details->currency != NULL) && details->currency->precedes) {
 		gsf_xml_out_simple_element(xout, NUMBER "currency-symbol", 
 					   details->currency->symbol);
 		if (details->currency->has_space)
@@ -6138,7 +6138,7 @@ go_format_output_currency_to_odf (GsfXMLOut *xout, GOFormat const *fmt,
 	odf_add_bool (xout, NUMBER "grouping", details->thousands_sep);
 	gsf_xml_out_add_int (xout, NUMBER "min-integer-digits", details->min_digits);
 	gsf_xml_out_end_element (xout); /* </number:number> */
-	if (!details->currency->precedes) {
+	if ((details->currency != NULL) && !details->currency->precedes) {
 		if (details->currency->has_space)
 			gsf_xml_out_simple_element(xout, NUMBER "text", " ");
 		gsf_xml_out_simple_element(xout, NUMBER "currency-symbol", 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]