SF.net SVN: geany: [431] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Jun 11 14:08:15 UTC 2006


Revision: 431
Author:   eht16
Date:     2006-06-11 07:08:10 -0700 (Sun, 11 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=431&view=rev

Log Message:
-----------
Fixed a segfault in document_find_by_filename().

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-06-11 11:14:11 UTC (rev 430)
+++ trunk/ChangeLog	2006-06-11 14:08:10 UTC (rev 431)
@@ -4,6 +4,7 @@
  * src/highlighting.c: Replaced "/" by G_DIR_SEPARATOR_S.
  * src/utils.c: Fixed an issue, which let the build menu item
                 insensitive once a new file w/o template was opened.
+ * src/document.c: Fixed a segfault in document_find_by_filename().
 
 
 2006-06-10  Enrico Troeger  <enrico.troeger at uvena.de>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2006-06-11 11:14:11 UTC (rev 430)
+++ trunk/src/document.c	2006-06-11 14:08:10 UTC (rev 431)
@@ -65,8 +65,8 @@
 
 	for(i = 0; i < GEANY_MAX_OPEN_FILES; i++)
 	{
-		gchar *dl_fname = (is_tm_filename) ? doc_list[i].tm_file->file_name :
-			doc_list[i].file_name;
+		gchar *dl_fname = (is_tm_filename && doc_list[i].tm_file) ?
+							doc_list[i].tm_file->file_name : doc_list[i].file_name;
 #ifdef GEANY_WIN32
 		// ignore the case of filenames and paths under WIN32, causes errors if not
 		if (dl_fname && ! strcasecmp(dl_fname, filename)) return i;


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