From 1bd5ef9a754a5b521f9d067b68fdac26035ef342 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 11 Jun 2016 23:26:02 -0400 Subject: [PATCH] Add some comments to fix coverity #23386. --- src/frontends/qt4/GuiApplication.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 460d7ad462..022418fc15 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1670,7 +1670,10 @@ 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] current_view_->openDocument(fname); + // FIXME but then why check current_view_ here? if (current_view_ && !current_view_->documentBufferView()) current_view_->close(); } else {