Fix crash when removing last converter (bug 8178)

This commit is contained in:
Juergen Spitzmueller 2012-05-29 15:40:07 +02:00
parent 0695fd54d8
commit 026f53f41c
2 changed files with 13 additions and 5 deletions

View File

@ -1695,10 +1695,16 @@ void PrefConverters::updateButtons()
bool const valid = !(converterED->text().isEmpty() bool const valid = !(converterED->text().isEmpty()
|| from.name() == to.name()); || from.name() == to.name());
int const cnr = convertersLW->currentItem()->type(); string old_command;
Converter const & c = form_->converters().get(cnr); string old_flag;
string const old_command = c.command;
string const old_flag = c.flags; 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_command = fromqstr(converterED->text());
string const new_flag = fromqstr(converterFlagED->text()); string const new_flag = fromqstr(converterFlagED->text());

View File

@ -131,7 +131,7 @@ What's new
* USER INTERFACE * 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). are references to that label in math (bug 8095).
- Fix crash when clicking away in the same math inset just after hitting '\' - 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 - Fix crash when dissolving a math macro whose first argument is another
parameterless macro (bug 8105). 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. - Update the current view after dispatching a command through the lyxserver.
The missing screen update could cause either a failure in executing the The missing screen update could cause either a failure in executing the
command or could even crash LyX (bugs 6871 and 8119). command or could even crash LyX (bugs 6871 and 8119).