]> git.lyx.org Git - features.git/commitdiff
Replace coverity comment with assertion.
authorRichard Heck <rgheck@lyx.org>
Tue, 14 Jun 2016 17:26:08 +0000 (18:26 +0100)
committerRichard Heck <rgheck@lyx.org>
Tue, 14 Jun 2016 17:26:08 +0000 (18:26 +0100)
src/frontends/qt4/GuiApplication.cpp

index 3fac0b792167192f9f08c02a6df37367a7079b7d..958eca1912999203477b6c6fbab55efc3e8b15be 100644 (file)
@@ -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;