diff --git a/ChangeLog b/ChangeLog index 4ce2841d..c39558e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/src/msgwindow.c b/src/msgwindow.c index 298e86be..5611ee32 100644 --- a/src/msgwindow.c +++ b/src/msgwindow.c @@ -586,9 +586,10 @@ gboolean msgwin_goto_compiler_file_line() { /* 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);