From: Benjamin Piwowarski Date: Tue, 5 Jun 2012 09:06:38 +0000 (+0200) Subject: Fixed a bug when there is no citation X-Git-Tag: 2.1.0beta1~910 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=8c09d3ba1a916aeab204ea79a0b6a342ffeb718b;p=lyx.git Fixed a bug when there is no citation --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index cb2b7fba03..4aa3360017 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1914,7 +1914,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) Inset * inset = cur.nextInset(); if (!inset || inset->lyxCode() != CITE_CODE) inset = cur.prevInset(); - if (inset->lyxCode() == CITE_CODE) { + if (inset && inset->lyxCode() == CITE_CODE) { InsetCitation * icite = static_cast(inset); if (icite->addKey(arg)) { dr.forceBufferUpdate();