goffice r2293 - in trunk: . goffice/graph



Author: emmanuel
Date: Sat Dec 13 18:37:10 2008
New Revision: 2293
URL: http://svn.gnome.org/viewvc/goffice?rev=2293&view=rev

Log:
2008-12-13  Emmanuel Pacaud <emmanuel pacaud lapp in2p3 fr>

	Avoid a crash when the equation expression is empty.

	* goffice/graph/gog-equation.c (_update_equation_style): here.

Modified:
   trunk/ChangeLog
   trunk/goffice/graph/gog-equation.c

Modified: trunk/goffice/graph/gog-equation.c
==============================================================================
--- trunk/goffice/graph/gog-equation.c	(original)
+++ trunk/goffice/graph/gog-equation.c	Sat Dec 13 18:37:10 2008
@@ -121,7 +121,12 @@
 		return;
 
 	math_element = gmathml_document_get_math_element (equation->mathml);
+	if (math_element == NULL)
+		return;
+
 	math_style = gmathml_math_element_get_default_style (math_element);
+	if (math_style == NULL)
+		return;
 
 	math_style->math_color.red = DOUBLE_RGBA_R (style->font.color);
 	math_style->math_color.green = DOUBLE_RGBA_G (style->font.color);



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