From: Peter Kümmel Date: Sat, 4 Nov 2006 13:05:07 +0000 (+0000) Subject: fix crash in preferences dialog X-Git-Tag: 1.6.10~12046 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=60059d0c085b574cbe3211536d54d417a24de6c3;p=features.git fix crash in preferences dialog git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15732 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/QPrefsDialog.C b/src/frontends/qt4/QPrefsDialog.C index a94fbd2a53..213d828948 100644 --- a/src/frontends/qt4/QPrefsDialog.C +++ b/src/frontends/qt4/QPrefsDialog.C @@ -938,10 +938,13 @@ void PrefConverters::updateGui() void PrefConverters::switch_converter(int nr) { - if (nr<0) + if (nr < 0) return; 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)); converterFromCO->setCurrentIndex(form_->formats().getNumber(c.from)); converterToCO->setCurrentIndex(form_->formats().getNumber(c.to)); @@ -970,6 +973,9 @@ void PrefConverters::updateButtons() || from.name() == to.name()); 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)); string const old_command = c.command; string const old_flag = c.flags;