]> git.lyx.org Git - features.git/commitdiff
fix crash
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 9 Dec 2002 10:12:03 +0000 (10:12 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 9 Dec 2002 10:12:03 +0000 (10:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5797 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/MenuBackend.C

index 553c87816c2f10194d36da7f46ad1ded8d33dd0a..40a7dd1c449059d0ead98988047dcd7e0bbe43e1 100644 (file)
@@ -1,3 +1,7 @@
+2002-12-09  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * MenuBackend.C (expandToc): fix crash.
+
 2002-12-08  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * MenuBackend.C (expandToc): gettext on float names.
index 0305c9558eabd8a413ae980aacd92e0a1f85fac7..bd58b3ec213107f7188367823914b070ca8d87ce 100644 (file)
@@ -504,8 +504,9 @@ void expandToc(Menu & tomenu, Buffer const * buf)
                        menu->add(MenuItem(MenuItem::Command,
                                           label, ccit->action()));
                }
-               MenuItem item(MenuItem::Submenu,
-                             _(floats[cit->first]->second.name()));
+               string const & floatName = cit->first;
+               // Is the _(...) really needed here? (Lgb)
+               MenuItem item(MenuItem::Submenu, _(floatName));
                item.submenu(menu);
                tomenu.add(item);
        }