mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Replace coverity comment with assertion.
This commit is contained in:
parent
b148629d56
commit
0fa905ceab
@ -1671,15 +1671,17 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
boost::crc_32_type crc;
|
||||
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]
|
||||
// we know current_view_ is non-null, because createView sets it.
|
||||
// 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;
|
||||
|
Loading…
Reference in New Issue
Block a user