SF.net SVN: geany: [2063] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed Nov 21 17:14:58 UTC 2007


Revision: 2063
          http://geany.svn.sourceforge.net/geany/?rev=2063&view=rev
Author:   eht16
Date:     2007-11-21 09:14:58 -0800 (Wed, 21 Nov 2007)

Log Message:
-----------
Fix crash when trying to add a multiline comment in filetypes which don't support it.

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-11-20 19:23:42 UTC (rev 2062)
+++ trunk/ChangeLog	2007-11-21 17:14:58 UTC (rev 2063)
@@ -1,3 +1,9 @@
+2007-11-21  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/editor.c: Fix crash when trying to add a multiline comment in
+                 filetypes which don't support it.
+
+
 2007-11-20  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * geany.glade, plugins/*.c src/callbacks.c, src/callbacks.h,

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2007-11-20 19:23:42 UTC (rev 2062)
+++ trunk/src/editor.c	2007-11-21 17:14:58 UTC (rev 2063)
@@ -2220,6 +2220,9 @@
 	gint pos;
 	gboolean have_multiline_comment = FALSE;
 
+	if (doc_list[idx].file_type == NULL || doc_list[idx].file_type->comment_open == NULL)
+		return;
+
 	if (doc_list[idx].file_type->comment_close != NULL &&
 		strlen(doc_list[idx].file_type->comment_close) > 0)
 		have_multiline_comment = 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