From 8c09d3ba1a916aeab204ea79a0b6a342ffeb718b Mon Sep 17 00:00:00 2001 From: Benjamin Piwowarski Date: Tue, 5 Jun 2012 11:06:38 +0200 Subject: [PATCH] Fixed a bug when there is no citation --- src/BufferView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();