From 0fa905ceab4f665e4e90d424b071255f1b1ff345 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 14 Jun 2016 18:26:08 +0100 Subject: [PATCH] Replace coverity comment with assertion. --- src/frontends/qt4/GuiApplication.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 3fac0b7921..958eca1912 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -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;