On Friday 26 April 2002 10:07 am, Juergen Spitzmueller wrote: > I have tried to run valgrind on it. Log attached (though I have no > experience with the programm, just ran "valgrind -v" on LyX). > > Hope this helps. > > Juergen.
It does. Is the crash fixed by the attached patch? Angus
Index: src/frontends/xforms/FormCitation.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormCitation.C,v retrieving revision 1.67 diff -u -p -r1.67 FormCitation.C --- src/frontends/xforms/FormCitation.C 24 Apr 2002 10:00:39 -0000 1.67 +++ src/frontends/xforms/FormCitation.C 26 Apr 2002 09:21:18 -0000 @@ -126,7 +126,7 @@ void FormCitation::apply() ControlCitation::getCiteStyles(); int const choice = - fl_get_choice(dialog_->choice_style) - 1; + std::max(0, fl_get_choice(dialog_->choice_style) - 1); bool const full = fl_get_button(dialog_->check_full_author_list); bool const force = @@ -429,7 +429,7 @@ ButtonPolicy::SMInput FormCitation::inpu currentCitekey = citekeys[0]; if (topCitekey != currentCitekey) { - int choice = fl_get_choice(dialog_->choice_style); + int choice = std::max(1, fl_get_choice(dialog_->choice_style)); fillChoice(dialog_.get(), controller().getCiteStrings(currentCitekey)); fl_set_choice(dialog_->choice_style, choice);