Fix missing NULL checks when reading the colour value of compiler output messages.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3595 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-02-24 18:25:57 +00:00
parent a6eda7c875
commit f63a63a008
2 changed files with 6 additions and 2 deletions

View File

@ -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>

View File

@ -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);