SF.net SVN: geany:[3344] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Mon Dec 8 17:05:15 UTC 2008
Revision: 3344
http://geany.svn.sourceforge.net/geany/?rev=3344&view=rev
Author: ntrel
Date: 2008-12-08 17:05:15 +0000 (Mon, 08 Dec 2008)
Log Message:
-----------
Fix GLib warning when user enters out of range line number in
toolbar.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-12-08 12:59:13 UTC (rev 3343)
+++ trunk/ChangeLog 2008-12-08 17:05:15 UTC (rev 3344)
@@ -2,6 +2,9 @@
* src/document.c:
Fix showing tooltips for notebook tab labels (oops).
+ * src/editor.c:
+ Fix GLib warning when user enters out of range line number in
+ toolbar.
2008-12-07 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2008-12-08 12:59:13 UTC (rev 3343)
+++ trunk/src/editor.c 2008-12-08 17:05:15 UTC (rev 3344)
@@ -3895,7 +3895,8 @@
gint pos;
g_return_val_if_fail(editor, FALSE);
- g_return_val_if_fail(line >= 0 && line <= sci_get_line_count(editor->sci), FALSE);
+ if (line < 0 || line >= sci_get_line_count(editor->sci))
+ return FALSE;
pos = sci_get_position_from_line(editor->sci, line);
return editor_goto_pos(editor, pos, TRUE);
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