SF.net SVN: geany: [2311] trunk/src/keyfile.c

eht16 at users.sourceforge.net eht16 at xxxxx
Fri Mar 7 14:21:02 UTC 2008


Revision: 2311
          http://geany.svn.sourceforge.net/geany/?rev=2311&view=rev
Author:   eht16
Date:     2008-03-07 06:21:01 -0800 (Fri, 07 Mar 2008)

Log Message:
-----------
When opening session files, don't try to set document properties if  the document can't be opened.

Modified Paths:
--------------
    trunk/src/keyfile.c

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2008-03-07 14:20:25 UTC (rev 2310)
+++ trunk/src/keyfile.c	2008-03-07 14:21:01 UTC (rev 2311)
@@ -855,10 +855,14 @@
 					-1, locale_filename, pos, ro, ft,
 					(enc_idx >= 0 && enc_idx < GEANY_ENCODINGS_MAX) ?
 						encodings[enc_idx].charset : NULL);
-				document_set_use_tabs(new_idx, use_tabs);
-				doc_list[new_idx].auto_indent = auto_indent;
-				document_set_line_wrapping(new_idx, line_wrapping);
-				ret = TRUE;
+
+				if (DOC_IDX_VALID(new_idx))
+				{
+					document_set_use_tabs(new_idx, use_tabs);
+					document_set_line_wrapping(new_idx, line_wrapping);
+					doc_list[new_idx].auto_indent = auto_indent;
+					ret = TRUE;
+				}
 			}
 			else
 			{


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