Fixed a bug when there is no citation

This commit is contained in:
Benjamin Piwowarski 2012-06-05 11:06:38 +02:00 committed by Julien Rioux
parent 9f62413b10
commit 8c09d3ba1a

View File

@ -1914,7 +1914,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
Inset * inset = cur.nextInset(); Inset * inset = cur.nextInset();
if (!inset || inset->lyxCode() != CITE_CODE) if (!inset || inset->lyxCode() != CITE_CODE)
inset = cur.prevInset(); inset = cur.prevInset();
if (inset->lyxCode() == CITE_CODE) { if (inset && inset->lyxCode() == CITE_CODE) {
InsetCitation * icite = static_cast<InsetCitation *>(inset); InsetCitation * icite = static_cast<InsetCitation *>(inset);
if (icite->addKey(arg)) { if (icite->addKey(arg)) {
dr.forceBufferUpdate(); dr.forceBufferUpdate();