From: Richard Heck Date: Sun, 12 Jun 2016 02:41:57 +0000 (-0400) Subject: Make sure we have a buffer in VC_COMPARE. X-Git-Tag: 2.3.0alpha1~1495 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2cb6ed93768faa2f8ae5f5bb27b5b8b50cf036d2;p=features.git 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 af7419d233..fc2170d106 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;