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); 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;