mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-04 06:15:59 +00:00
Fix crash on the decoration popup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@1337 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
389efe9e5a
commit
0442169830
@ -1,3 +1,8 @@
|
||||
2001-01-15 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* src/mathed/math_panel.C (deco_cb): fix crash when clicking on
|
||||
non-existing decoration.
|
||||
|
||||
2000-12-11 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* README: add mention of broken ghostscript versions, remove
|
||||
|
@ -242,8 +242,14 @@ void deco_cb(FL_OBJECT *, long data)
|
||||
case MM_OK:
|
||||
{
|
||||
int i = fl_get_bmtable(fd_deco->menu);
|
||||
lyxfunc->Dispatch(LFUN_INSERT_MATH, deco_code[i]);
|
||||
if (data == MM_APPLY) break;
|
||||
// ideally the callback should not be called if the index is
|
||||
// greater than the maxitem of the bmtable, but I do not know
|
||||
// how to enforce that (JMarc)
|
||||
if (i <= sizeof(deco_code)/sizeof(deco_code[0])) {
|
||||
lyxfunc->Dispatch(LFUN_INSERT_MATH, deco_code[i]);
|
||||
if (data == MM_APPLY) break;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
case MM_CLOSE: fl_hide_form(fd_deco->deco); break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user