mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
fix crash in preferences dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15732 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f2025c20e9
commit
60059d0c08
@ -938,10 +938,13 @@ void PrefConverters::updateGui()
|
|||||||
|
|
||||||
void PrefConverters::switch_converter(int nr)
|
void PrefConverters::switch_converter(int nr)
|
||||||
{
|
{
|
||||||
if (nr<0)
|
if (nr < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int const cnr = convertersLW->currentItem()->type();
|
int const cnr = convertersLW->currentItem()->type();
|
||||||
|
// FIXME: why is there now valid current item?
|
||||||
|
if (cnr < 0)
|
||||||
|
return;
|
||||||
Converter const & c(form_->converters().get(cnr));
|
Converter const & c(form_->converters().get(cnr));
|
||||||
converterFromCO->setCurrentIndex(form_->formats().getNumber(c.from));
|
converterFromCO->setCurrentIndex(form_->formats().getNumber(c.from));
|
||||||
converterToCO->setCurrentIndex(form_->formats().getNumber(c.to));
|
converterToCO->setCurrentIndex(form_->formats().getNumber(c.to));
|
||||||
@ -970,6 +973,9 @@ void PrefConverters::updateButtons()
|
|||||||
|| from.name() == to.name());
|
|| from.name() == to.name());
|
||||||
|
|
||||||
int const cnr = convertersLW->currentItem()->type();
|
int const cnr = convertersLW->currentItem()->type();
|
||||||
|
// FIXME: why is there now valid current item?
|
||||||
|
if (cnr < 0)
|
||||||
|
return;
|
||||||
Converter const & c(form_->converters().get(cnr));
|
Converter const & c(form_->converters().get(cnr));
|
||||||
string const old_command = c.command;
|
string const old_command = c.command;
|
||||||
string const old_flag = c.flags;
|
string const old_flag = c.flags;
|
||||||
|
Loading…
Reference in New Issue
Block a user