]> git.lyx.org Git - features.git/commitdiff
Fix crash loading old files (http://www.mail-archive.com/lyx-users%40lists.lyx.org...
authorJosé Matox <jamatos@lyx.org>
Tue, 17 Jul 2007 16:46:19 +0000 (16:46 +0000)
committerJosé Matox <jamatos@lyx.org>
Tue, 17 Jul 2007 16:46:19 +0000 (16:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19101 a592a061-630c-0410-9148-cb99ea01b6c8

lib/lyx2lyx/lyx_1_5.py

index dbffe31abbfe550ba7cbc97bb85d3b731de53481..3374d8567f229dd571c19a0476fa62feb0742c7e 100644 (file)
@@ -444,6 +444,13 @@ def convert_commandparams(document):
             i = i + 1
             continue
 
+        j = find_token(document.body, "\\end_inset", i + 1)
+        if j == -1:
+            document.warning("Malformed document")
+        else:
+            command += "".join(document.body[i+1:j])
+            document.body[i+1:j] = []
+
         # The following parser is taken from the original InsetCommandParams::scanCommand
         name = ""
         option1 = ""