fix crash in navigate menu

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5248 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-09-10 11:50:13 +00:00
parent bc56bb9ffa
commit 833519f638
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-09-10 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* MenuBackend.C (expandToc): fix crash when there is no document
open
2002-09-10 Dekel Tsur <dekelts@tau.ac.il>
* many files: Add insetwrap.

View File

@ -480,6 +480,12 @@ void expandToc2(Menu & tomenu, toc::Toc const & toc_list,
void expandToc(Menu & tomenu, Buffer const * buf)
{
if (!buf) {
tomenu.add(MenuItem(MenuItem::Command,
_("No Documents Open!"), LFUN_NOACTION));
return;
}
FloatList const & floats = buf->params.getLyXTextClass().floats();
toc::TocList toc_list = toc::getTocList(buf);
toc::TocList::const_iterator cit = toc_list.begin();