On Fri, Apr 16, 2010 at 8:42 AM, Tiago Vignatti <[email protected]> wrote: > Both mouse and mouse->button are already used before their checking were being > performed. So check on the beginning. > > Signed-off-by: Tiago Vignatti <[email protected]> > --- > Xi/exevents.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/Xi/exevents.c b/Xi/exevents.c > index e680f6f..7a1f6cf 100644 > --- a/Xi/exevents.c > +++ b/Xi/exevents.c > @@ -1241,6 +1241,8 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, > int detail, > int btlen, len, i; > > mouse = (IsMaster(dev) || dev->u.master) ? GetMaster(dev, MASTER_POINTER) > : dev; > + if (!mouse || !mouse->button) > + FatalError("no device mouse found");
Do we really want to kill the server here? Maybe just ErrorF + return would be appropriate. -- Dan _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
