gnumeric r16422 - in branches/gnumeric-1-8: . src



Author: mortenw
Date: Fri Feb 29 15:17:17 2008
New Revision: 16422
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16422&view=rev

Log:
2008-02-29  Morten Welinder  <terra gnome org>

	* src/mstyle.c (link_border_colors): Handle NULL border which is
	advertised as being ok.  Fixes #519451.



Modified:
   branches/gnumeric-1-8/ChangeLog
   branches/gnumeric-1-8/NEWS
   branches/gnumeric-1-8/src/mstyle.c

Modified: branches/gnumeric-1-8/NEWS
==============================================================================
--- branches/gnumeric-1-8/NEWS	(original)
+++ branches/gnumeric-1-8/NEWS	Fri Feb 29 15:17:17 2008
@@ -28,6 +28,7 @@
 	* Fix corrupted-applix-bugs.  [#517778]
 	* Fix sylk importer's format handling.
 	* Fix memory allocation failure for huge .gnumeric files.  [#519319]
+	* Fix mstyle problem.  [#519451]
 
 --------------------------------------------------------------------------
 Gnumeric 1.8.1

Modified: branches/gnumeric-1-8/src/mstyle.c
==============================================================================
--- branches/gnumeric-1-8/src/mstyle.c	(original)
+++ branches/gnumeric-1-8/src/mstyle.c	Fri Feb 29 15:17:17 2008
@@ -593,13 +593,17 @@
 static GnmStyle *
 link_border_colors (GnmStyle *style, GnmColor *auto_color, gboolean make_copy)
 {
-	GnmBorder *border;
-	GnmColor *color;
 	int i;
 
 	for (i = MSTYLE_BORDER_TOP ; i <= MSTYLE_BORDER_DIAGONAL ; ++i) {
 		if (elem_is_set (style, i)) {
-			border = style->borders[i- MSTYLE_BORDER_TOP];
+			GnmBorder *border =
+				style->borders[i- MSTYLE_BORDER_TOP];
+			GnmColor *color;
+
+			if (!border)
+				continue;
+
 			color = border->color;
 			if (color->is_auto && auto_color != color) {
 				GnmBorder *new_border;



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