]> git.lyx.org Git - features.git/commitdiff
Fix crash
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 6 Feb 2014 12:07:00 +0000 (13:07 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 6 Feb 2014 12:07:00 +0000 (13:07 +0100)
src/frontends/qt4/Menus.cpp

index 68169864950768613d75688e4f41352d3b4c1cae..cc07afc5a95d9fb6d7b860b1ff3b04f1d152abb7 100644 (file)
@@ -1666,7 +1666,7 @@ void MenuDefinition::expandEnvironmentSeparators(BufferView const * bv)
        if (!bv)
                return;
 
-       pit_type pit = bv->cursor().pit();
+       pit_type pit = bv->cursor().selBegin().pit();
        Paragraph const & par = bv->buffer().text().getPar(pit);
        docstring const curlayout = par.layout().name();
        docstring outerlayout;