Fix crash when session is empty.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19716 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-08-22 08:34:48 +00:00
parent 5eb43656d7
commit 2419c80657

View File

@ -664,6 +664,7 @@ void LyX::restoreGuiSession()
// FIXME: Switch to the last loaded Buffer. This must not be the first one
// because the Buffer won't be connected in this case. The correct solution
// would be to avoid the manual connection of the current Buffer in LyXView.
if (!pimpl_->buffer_list_.empty())
view->setBuffer(pimpl_->buffer_list_.last());
}