Fix crash when switching window when previous window had no BufferView.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31450 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2009-09-23 07:14:20 +00:00
parent fd801c9c90
commit 1069dfa7a0

View File

@ -764,7 +764,7 @@ bool GuiView::event(QEvent * e)
setFocus();
return QMainWindow::event(e);
}
if (old_view) {
if (old_view && old_view->currentBufferView()) {
// save current selection to the selection buffer to allow
// middle-button paste in this window.
cap::saveSelection(old_view->currentBufferView()->cursor());