commit 2cb6ed93768faa2f8ae5f5bb27b5b8b50cf036d2
Author: Richard Heck <[email protected]>
Date: Sat Jun 11 22:41:57 2016 -0400
Make sure we have a buffer in VC_COMPARE.
Fixes coverity #23304.
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index af7419d..fc2170d 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -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;