]> git.lyx.org Git - features.git/commitdiff
Make sure we have a buffer in VC_COMPARE.
authorRichard Heck <rgheck@lyx.org>
Sun, 12 Jun 2016 02:41:57 +0000 (22:41 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 12 Jun 2016 03:09:30 +0000 (23:09 -0400)
Fixes coverity #23304.

src/frontends/qt4/GuiView.cpp

index af7419d233e7269f3814fca10f16c7941ef157d0..fc2170d1064b67ba338a80f2e7fe96f87a4fb73a 100644 (file)
@@ -3241,7 +3241,6 @@ void GuiView::dispatchVC(FuncRequest const & cmd, DispatchResult & dr)
                }
 
        case LFUN_VC_COMPARE: {
-
                if (cmd.argument().empty()) {
                        lyx::dispatch(FuncRequest(LFUN_DIALOG_SHOW, "comparehistory"));
                        break;
@@ -3251,6 +3250,8 @@ void GuiView::dispatchVC(FuncRequest const & cmd, DispatchResult & dr)
                string f1, f2;
 
                // f1
+               // it seems safe to assume we have a buffer
+               // coverity[FORWARD_NULL]
                if (!buffer->lyxvc().prepareFileRevision(rev1, f1))
                        break;