From cbf86e656bdb700b901d982ba5043d2fce0528d7 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 25 Jan 2001 13:20:19 +0000 Subject: [PATCH] Update INSTALL git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1387 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 6 ++++++ src/frontends/xforms/FormPreferences.C | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index f1090fdafb..894f49dc20 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,9 @@ +2001-01-25 Jean-Marc Lasgouttes + + * FormPreferences.C (GetFrom): fix crash when there is no format + defined. + (GetTo): ditto. + 2001-01-23 Angus Leeming * FormPreferences.C (LoadBrowserLyX): convert unsigned short to diff --git a/src/frontends/xforms/FormPreferences.C b/src/frontends/xforms/FormPreferences.C index 219f606809..e03fed5753 100644 --- a/src/frontends/xforms/FormPreferences.C +++ b/src/frontends/xforms/FormPreferences.C @@ -1185,7 +1185,7 @@ bool FormPreferences::Converters::Input() string const FormPreferences::Converters::GetFrom() const { int const i = fl_get_choice(dialog_->choice_from); - if (i > 0) + if (i > 0 && i <= local_formats.size()) return local_formats.Get(i-1).name(); else { lyxerr << "FormPreferences::Converters::GetFrom: No choice!" @@ -1198,7 +1198,7 @@ string const FormPreferences::Converters::GetFrom() const string const FormPreferences::Converters::GetTo() const { int const i = fl_get_choice(dialog_->choice_to); - if (i > 0) + if (i > 0 && i <= local_formats.size()) return local_formats.Get(i-1).name(); else { lyxerr << "FormPreferences::Converters::GetTo: No choice!"