mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Fix #6013: SIGABRT if we spell check inside a math macro, and then hit replace
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
This commit is contained in:
parent
1c6eea89b4
commit
73f9991eec
@ -163,6 +163,8 @@ void GuiSpellchecker::on_replacePB_clicked()
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user