SF.net SVN: geany: [1633] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Wed Jun 20 12:42:09 UTC 2007


Revision: 1633
          http://svn.sourceforge.net/geany/?rev=1633&view=rev
Author:   ntrel
Date:     2007-06-20 05:42:06 -0700 (Wed, 20 Jun 2007)

Log Message:
-----------
Prevent segfault when using Goto Tag from an untitled file.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-06-19 17:11:46 UTC (rev 1632)
+++ trunk/ChangeLog	2007-06-20 12:42:06 UTC (rev 1633)
@@ -1,3 +1,9 @@
+2007-06-20  Nick Treleaven  <nick.treleaven at btinternet.com>
+
+ * src/callbacks.c:
+   Prevent segfault when using goto tag from an untitled file.
+
+
 2007-06-19  Nick Treleaven  <nick.treleaven at btinternet.com>
 
  * HACKING:

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2007-06-19 17:11:46 UTC (rev 1632)
+++ trunk/src/callbacks.c	2007-06-20 12:42:06 UTC (rev 1633)
@@ -1255,8 +1255,9 @@
 			TRUE, tmtag->atts.entry.line))
 		{
 			// first add old file as old position
-			navqueue_new_position(doc_list[old_idx].tm_file->file_name,
-				sci_get_line_from_position(doc_list[old_idx].sci, editor_info.click_pos) + 1);
+			if (doc_list[old_idx].tm_file)
+				navqueue_new_position(doc_list[old_idx].tm_file->file_name,
+					sci_get_line_from_position(doc_list[old_idx].sci, editor_info.click_pos) + 1);
 
 			navqueue_new_position(tmtag->atts.entry.file->work_object.file_name,
 				tmtag->atts.entry.line);


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