diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 2c4c93e042..6a619200e2 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -583,7 +583,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd) && flag.enabled() && !lyxaction.funcHasFlag(action, LyXAction::NoBuffer) && !lyxaction.funcHasFlag(action, LyXAction::ReadOnly)) - doc_buffer->markDirty(); + lv->currentBufferView()->buffer().markDirty(); if (lv && lv->currentBufferView()) { // BufferView::update() updates the ViewMetricsInfo and