commit d5eeabcfddf9edefc0751da1192c330674b3ea8f
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Mon Mar 9 11:14:26 2015 +0100

    Check that DocIterator::sanitize only adds editable insets
    
    This fixes the crash on ticket #9432, but the bug there has other causes.

diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp
index 859aae9..e574115 100644
--- a/src/DocIterator.cpp
+++ b/src/DocIterator.cpp
@@ -555,6 +555,11 @@ void DocIterator::sanitize()
                        fixIfBroken();
                        break;
                }
+               if (!inset->editable()) {
+                       LYXERR0("Inset found on cursor stack is not editable.");
+                       fixIfBroken();
+                       break;
+               }
                push_back(sl[i]);
                top().inset_ = inset;
                if (fixIfBroken())

Reply via email to