mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Replace coverity comment with assertion.
This commit is contained in:
parent
b148629d56
commit
0fa905ceab
@ -1672,14 +1672,16 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
crc = for_each(fname.begin(), fname.end(), crc);
|
crc = for_each(fname.begin(), fname.end(), crc);
|
||||||
createView(crc.checksum());
|
createView(crc.checksum());
|
||||||
// we know current_view_ is non-null, because createView sets it.
|
// 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);
|
current_view_->openDocument(fname);
|
||||||
// FIXME but then why check current_view_ here?
|
// FIXME but then why check current_view_ here?
|
||||||
if (current_view_ && !current_view_->documentBufferView())
|
if (current_view_ && !current_view_->documentBufferView())
|
||||||
current_view_->close();
|
current_view_->close();
|
||||||
} else {
|
} else {
|
||||||
// we know !d->views.empty(), so this should be ok
|
// 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);
|
current_view_->openDocument(fname);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user