This is just a matter of checking that we are in an insettext before calling
replaceSelectionWithString. I guess there are other good ways to fix the crash.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30399
a592a061-630c-0410-9148-
cb99ea01b6c8
LYXERR(Debug::GUI, "Replace (" << replacement << ")");
BufferView * bv = const_cast<BufferView *>(bufferview());
+ if (!bv->cursor().inTexted())
+ return;
cap::replaceSelectionWithString(bv->cursor(), replacement, true);
bv->buffer().markDirty();
// If we used an LFUN, we would not need that