Remove useless test

Coverity issue 23300.
This commit is contained in:
Jean-Marc 2015-09-12 19:53:29 +02:00
parent 28e997781d
commit d786d98c36

View File

@ -1122,12 +1122,10 @@ void MenuDefinition::expandFormats(MenuItem::Kind const kind, Buffer const * buf
label += '|' + shortcut;
if (view_update) {
if (buf)
item.submenu().addWithStatusCheck(MenuItem(MenuItem::Command,
toqstr(label), FuncRequest(action, (*fit)->name())));
else
item.submenu().add(MenuItem(MenuItem::Command, toqstr(label),
FuncRequest(action, (*fit)->name())));
// note that at this point, we know that buf is not null
LATTEST(buf);
item.submenu().addWithStatusCheck(MenuItem(MenuItem::Command,
toqstr(label), FuncRequest(action, (*fit)->name())));
} else {
if (buf)
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label),