From 9c771f709c43cdc35d2078ea554310c6f8b2120a Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Mon, 12 Mar 2007 16:30:15 +0000 Subject: [PATCH] Fix segfault (oops). git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1387 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 37055e2e..998ababd 100644 --- a/src/utils.c +++ b/src/utils.c @@ -385,7 +385,7 @@ static gboolean current_function_changed(gint cur_idx, gint cur_line, gint fold_ gboolean ret; // check if the cached line and file index have changed since last time: - if (cur_idx != old_idx) + if (cur_idx < 0 || cur_idx != old_idx) ret = TRUE; else if (cur_line == old_line)