From 20047f7dab442afd786c00c8774e465c0087bf9e Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Sat, 20 May 2006 20:03:34 +0000 Subject: [PATCH] fix a segfault clicking on a compile error if the compiled file has been closed git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@348 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 2 ++ src/utils.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 98560331..0c485288 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ the open file dialog * src/sci_cb.c: fix a segfault when commenting out lines with ctrl-d when no filetype is set + * src/utils.c: fix a segfault clicking on a compile error if the + compiled file has been closed 2006-05-19 Enrico Troeger diff --git a/src/utils.c b/src/utils.c index 68dd1feb..8412696b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -2218,7 +2218,7 @@ void utils_parse_compiler_error_line(const gchar *string) gint idx = document_get_cur_idx(); gint line = -1; - if (string == NULL) return; + if (string == NULL || !doc_list[app->cur_idx].is_valid) return; // first get the line switch (doc_list[app->cur_idx].file_type->id)