Fix two glaring unconditional-NULL-dereferences.
This commit is contained in:
parent
a68c11bb1d
commit
aae4238360
|
@ -1,3 +1,9 @@
|
|||
2006-03-25 Daniel Stone <daniel@freedesktop.org>
|
||||
|
||||
* xkb/xkbUtils.c:
|
||||
Fix two of the more glaring unconditional-NULL-dereference screwups.
|
||||
There are many more left.
|
||||
|
||||
2006-03-25 Adam Jackson <ajax@freedesktop.org>
|
||||
|
||||
* hw/xfree86/common/xf86Bus.c:
|
||||
|
|
|
@ -682,6 +682,9 @@ CARD16 grp_mask;
|
|||
XkbStatePtr state= &xkbi->state;
|
||||
XkbCompatMapPtr map;
|
||||
|
||||
if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
|
||||
return;
|
||||
|
||||
map= xkbi->desc->compat;
|
||||
grp_mask= map->groups[state->group].mask;
|
||||
state->compat_state = state->mods|grp_mask;
|
||||
|
@ -741,6 +744,9 @@ XkbStatePtr state= &xkbi->state;
|
|||
XkbControlsPtr ctrls= xkbi->desc->ctrls;
|
||||
unsigned char grp;
|
||||
|
||||
if (!state || !ctrls)
|
||||
return;
|
||||
|
||||
state->mods= (state->base_mods|state->latched_mods);
|
||||
state->mods|= state->locked_mods;
|
||||
state->lookup_mods= state->mods&(~ctrls->internal.mask);
|
||||
|
|
Loading…
Reference in New Issue