diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 360884389a..f638805ab0 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1498,6 +1498,10 @@ void TabWorkArea::closeCurrentBuffer() { if (clicked_tab_ != -1) setCurrentIndex(clicked_tab_); + else + // Before dispatching the LFUN we should be sure this + // is the current workarea. + currentWorkAreaChanged(currentWorkArea()); lyx::dispatch(FuncRequest(LFUN_BUFFER_CLOSE)); }