fix a seg witn +set in_grab on the command line

This commit is contained in:
Bill Currie 2001-09-05 03:14:41 +00:00
parent 75aaccf9f0
commit f9e610bf6b

View file

@ -476,6 +476,8 @@ event_motion (XEvent * event)
void void
IN_LL_Grab_Input (void) IN_LL_Grab_Input (void)
{ {
if (!x_disp || !x_win)
return;
XGrabPointer (x_disp, x_win, True, MOUSE_MASK, GrabModeAsync, XGrabPointer (x_disp, x_win, True, MOUSE_MASK, GrabModeAsync,
GrabModeAsync, x_win, None, CurrentTime); GrabModeAsync, x_win, None, CurrentTime);
if (in_dga->int_val) if (in_dga->int_val)
@ -486,6 +488,8 @@ IN_LL_Grab_Input (void)
void void
IN_LL_Ungrab_Input (void) IN_LL_Ungrab_Input (void)
{ {
if (!x_disp || !x_win)
return;
if (in_dga->int_val) if (in_dga->int_val)
dga_off (); dga_off ();
XUngrabPointer (x_disp, CurrentTime); XUngrabPointer (x_disp, CurrentTime);