From: Juergen Spitzmueller Date: Tue, 29 May 2012 13:40:07 +0000 (+0200) Subject: Fix crash when removing last converter (bug 8178) X-Git-Tag: 2.0.4~46 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=026f53f41c2f61c25e59b4136481893aaac7558e;p=features.git Fix crash when removing last converter (bug 8178) --- diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index b32d8f09fb..8038fc1319 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -1695,10 +1695,16 @@ void PrefConverters::updateButtons() bool const valid = !(converterED->text().isEmpty() || from.name() == to.name()); - int const cnr = convertersLW->currentItem()->type(); - Converter const & c = form_->converters().get(cnr); - string const old_command = c.command; - string const old_flag = c.flags; + string old_command; + string old_flag; + + if (convertersLW->count() > 0) { + int const cnr = convertersLW->currentItem()->type(); + Converter const & c = form_->converters().get(cnr); + old_command = c.command; + old_flag = c.flags; + } + string const new_command = fromqstr(converterED->text()); string const new_flag = fromqstr(converterFlagED->text()); diff --git a/status.20x b/status.20x index 5ae89482f5..9343bff625 100644 --- a/status.20x +++ b/status.20x @@ -131,7 +131,7 @@ What's new * USER INTERFACE -- Fixed crash when modifying or pasting an equation label and there +- Fix crash when modifying or pasting an equation label and there are references to that label in math (bug 8095). - Fix crash when clicking away in the same math inset just after hitting '\' @@ -140,6 +140,8 @@ What's new - Fix crash when dissolving a math macro whose first argument is another parameterless macro (bug 8105). +- Fix crash when removing all converters in preferences (bug 8178). + - Update the current view after dispatching a command through the lyxserver. The missing screen update could cause either a failure in executing the command or could even crash LyX (bugs 6871 and 8119).