[email protected] writes:

> Author: lasgouttes
> Date: Tue Jul  7 12:50:27 2009
> New Revision: 30399
> URL: http://www.lyx.org/trac/changeset/30399
>
> Log:
> 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.
>

Abdel, if you have a better idea, please advise. 

Juergen, this is candidate for branch too.

> Modified:
>    lyx-devel/trunk/src/frontends/qt4/GuiSpellchecker.cpp
>
> Modified: lyx-devel/trunk/src/frontends/qt4/GuiSpellchecker.cpp
> ==============================================================================
> --- lyx-devel/trunk/src/frontends/qt4/GuiSpellchecker.cpp     Tue Jul  7 
> 10:23:31 2009        (r30398)
> +++ lyx-devel/trunk/src/frontends/qt4/GuiSpellchecker.cpp     Tue Jul  7 
> 12:50:27 2009        (r30399)
> @@ -163,6 +163,8 @@
>  
>       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

Reply via email to