SF.net SVN: geany: [2136] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Dec 30 15:31:45 UTC 2007


Revision: 2136
          http://geany.svn.sourceforge.net/geany/?rev=2136&view=rev
Author:   eht16
Date:     2007-12-30 07:31:45 -0800 (Sun, 30 Dec 2007)

Log Message:
-----------
Avoid crash on Windows with enabled debug messages.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-12-30 15:20:22 UTC (rev 2135)
+++ trunk/ChangeLog	2007-12-30 15:31:45 UTC (rev 2136)
@@ -3,6 +3,7 @@
  * tagmanager/basic.c:
    Don't parse in comments and fix wrong creation of tags including
    non-tag characters(e.g. '=' sign).
+ * src/document.c: Avoid crash on Windows with enabled debug messages.
 
 
 2007-12-28  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2007-12-30 15:20:22 UTC (rev 2135)
+++ trunk/src/document.c	2007-12-30 15:31:45 UTC (rev 2136)
@@ -1930,7 +1930,10 @@
 	if (type == NULL || ! DOC_IDX_VALID(idx))
 		return;
 
-	geany_debug("%s : %s (%s)",	doc_list[idx].file_name, type->name, doc_list[idx].encoding);
+	geany_debug("%s : %s (%s)",
+		(doc_list[idx].file_name != NULL) ? doc_list[idx].file_name : "unknown",
+		(type->name != NULL) ? type->name : "unknown",
+		(doc_list[idx].encoding != NULL) ? doc_list[idx].encoding : "unknown");
 
 	ft_changed = (doc_list[idx].file_type != type);
 	if (ft_changed)	// filetype has changed


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