goffice r2232 - in branches/goffice-0-6: . plugins/plot_surface



Author: jbrefort
Date: Fri Oct 10 09:16:10 2008
New Revision: 2232
URL: http://svn.gnome.org/viewvc/goffice?rev=2232&view=rev

Log:
2008-10-10  Jean Brefort  <jean brefort normalesup org>

	* plugins/plot_surface/gog-surface.c: (gog_contour_view_render): do
	not try to access NULL data. [#555757]



Modified:
   branches/goffice-0-6/ChangeLog
   branches/goffice-0-6/NEWS
   branches/goffice-0-6/plugins/plot_surface/gog-surface.c

Modified: branches/goffice-0-6/NEWS
==============================================================================
--- branches/goffice-0-6/NEWS	(original)
+++ branches/goffice-0-6/NEWS	Fri Oct 10 09:16:10 2008
@@ -4,6 +4,9 @@
 	Fix crash in go_help_display when non gnome applications use
 	goffice with gnome. [#551128]
 
+Jean:
+	* Fix Null pointer crash in gog_contour_view_render. [#555757]
+
 Morten:
 	* Fix go_url_resolve_relative.  [#550898]
 

Modified: branches/goffice-0-6/plugins/plot_surface/gog-surface.c
==============================================================================
--- branches/goffice-0-6/plugins/plot_surface/gog-surface.c	(original)
+++ branches/goffice-0-6/plugins/plot_surface/gog-surface.c	Fri Oct 10 09:16:10 2008
@@ -620,6 +620,13 @@
 	if (imax ==0 || jmax == 0)
 		return;
 
+	if (plot->plotted_data)
+		data = plot->plotted_data;
+	else
+		data = gog_contour_plot_build_matrix (plot, &cw);
+	if (!data)
+		return;
+
 	x_map = gog_axis_map_new (plot->base.axis[0], 
 				  view->residual.x , view->residual.w);
 	y_map = gog_axis_map_new (plot->base.axis[1], 
@@ -633,11 +640,6 @@
 		return;
 	}
 
-	if (plot->plotted_data)
-		data = plot->plotted_data;
-	else
-		data = gog_contour_plot_build_matrix (plot, &cw);
-
 	/* Set cw to ensure that polygons will allways be drawn clockwise */
 	xdiscrete = gog_axis_is_discrete (plot->base.axis[0]) ||
 			series->values[(plot->transposed)? 1: 0].data == NULL;



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