]> git.lyx.org Git - features.git/commitdiff
Fix crash when using context menu in empty outliner
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 4 Nov 2013 21:07:44 +0000 (22:07 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 16 Nov 2013 10:19:11 +0000 (11:19 +0100)
Fixes: #8885
src/frontends/qt4/TocWidget.cpp
status.20x

index 80c9db97d952a6ab773ca96eca3f0675fbc5f7a8..bfdc9f06ca93a99eb6a9dabfb36ef78fa61ff2fe 100644 (file)
@@ -152,7 +152,7 @@ bool TocWidget::getStatus(Cursor & cur, FuncRequest const & cmd,
        case LFUN_OUTLINE_IN:
        case LFUN_OUTLINE_OUT:
        case LFUN_SECTION_SELECT:
-               status.setEnabled(true);
+               status.setEnabled(item.dit() != 0);
                return true;
 
        case LFUN_LABEL_COPY_AS_REF: {
index c15980ca1426b944eb77d7e6f7f8da27fe97b0b8..efb796e8310beb0205b5a6dc9715c16be45de1b3 100644 (file)
@@ -87,6 +87,9 @@ What's new
 
 - Fix crash when changing alignment of several cells in tabular (bug 8859).
 
+- Disable invalid actions in empty outliner that could trigger a crash
+  (bug 8885).
+
 - Fix bug where searching for next change may leave an empty paragraph
   where cursor was (bug 3199).