[gnumeric] Fix crash on certain handcrafted ODF files. [#626632]



commit f70ae9e3ba45aa6236dbee314a08ba8996a6646c
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Wed Aug 11 08:26:55 2010 -0600

    Fix crash on certain handcrafted ODF files. [#626632]
    
    2010-08-11  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-read.c (oo_chart_axis): check for NULL style_name

 NEWS                                 |    1 +
 plugins/openoffice/ChangeLog         |    4 ++++
 plugins/openoffice/openoffice-read.c |    3 ++-
 3 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 6961b16..12a5b9f 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Andreas:
 	* Clarify autofilter dialog. [#625688]
 	* Make the tooltips theme-independent. [#625966]
 	* Adjust and fix WORKDAY and NETWORKDAY.
+	* Fix crash on certain handcrafted ODF files. [#626632]
 
 Jean:
 	* Import Guppi graphs from gnumeric-1.0.x files. [#567953]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index b2fd691..50a5e35 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-11  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* openoffice-read.c (oo_chart_axis): check for NULL style_name
+
 2010-07-30  Morten Welinder <terra gnome org>
 
 	* Release 1.10.8
diff --git a/plugins/openoffice/openoffice-read.c b/plugins/openoffice/openoffice-read.c
index 34e0b85..e87e96b 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -3495,7 +3495,8 @@ oo_chart_axis (GsfXMLIn *xin, xmlChar const **attrs)
 		oo_prop_list_apply (style->axis_props, G_OBJECT (state->chart.axis));
 	}
 
-	if (NULL != (style = g_hash_table_lookup (state->chart.graph_styles, style_name))) {
+	if (NULL != style_name &&
+	    NULL != (style = g_hash_table_lookup (state->chart.graph_styles, style_name))) {
 		if (NULL != state->chart.axis)
 			oo_prop_list_apply (style->axis_props, G_OBJECT (state->chart.axis));
 



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