mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix crash when removing last converter (bug 8178)
This commit is contained in:
parent
9fc92f783c
commit
ab3491adef
@ -1694,10 +1694,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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user