Replace coverity comment with assertion.

This commit is contained in:
Richard Heck 2016-06-14 18:26:08 +01:00
parent b148629d56
commit 0fa905ceab

View File

@ -1672,14 +1672,16 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
crc = for_each(fname.begin(), fname.end(), crc);
createView(crc.checksum());
// we know current_view_ is non-null, because createView sets it.
// coverity[FORWARD_NULL]
// but let's make sure
LASSERT(current_view_, break);
current_view_->openDocument(fname);
// FIXME but then why check current_view_ here?
if (current_view_ && !current_view_->documentBufferView())
current_view_->close();
} else {
// we know !d->views.empty(), so this should be ok
// coverity[FORWARD_NULL]
// but let's make sure
LASSERT(current_view_, break);
current_view_->openDocument(fname);
}
break;