SF.net SVN: geany:[3595] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Tue Feb 24 18:25:57 UTC 2009


Revision: 3595
          http://geany.svn.sourceforge.net/geany/?rev=3595&view=rev
Author:   eht16
Date:     2009-02-24 18:25:57 +0000 (Tue, 24 Feb 2009)

Log Message:
-----------
Fix missing NULL checks when reading the colour value of compiler output messages.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/msgwindow.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-02-24 18:25:41 UTC (rev 3594)
+++ trunk/ChangeLog	2009-02-24 18:25:57 UTC (rev 3595)
@@ -3,6 +3,9 @@
  * configure.in, plugins/Makefile.am:
    Enable socket support when cross-compiling.
    Enable plugin compilation when cross-compiling.
+ * src/msgwindow.c:
+   Fix missing NULL checks when reading the colour value of compiler
+   output messages.
 
 
 2009-02-20  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/src/msgwindow.c
===================================================================
--- trunk/src/msgwindow.c	2009-02-24 18:25:41 UTC (rev 3594)
+++ trunk/src/msgwindow.c	2009-02-24 18:25:57 UTC (rev 3595)
@@ -586,9 +586,10 @@
 	{
 		/* if the item is not coloured red, it's not an error line */
 		gtk_tree_model_get(model, &iter, 0, &color, -1);
-		if (! gdk_color_equal(color, &color_error))
+		if (color == NULL || ! gdk_color_equal(color, &color_error))
 		{
-			gdk_color_free(color);
+			if (color != NULL)
+				gdk_color_free(color);
 			return FALSE;
 		}
 		gdk_color_free(color);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list