Avoid assertion violations in tty menus in rare cases
* src/term.c (mouse_get_xy): Restore the lost protection against 'mouse_position' returning nil as mouse coordinates. (Bug#80603)
This commit is contained in:
10
src/term.c
10
src/term.c
@@ -3154,9 +3154,13 @@ mouse_get_xy (int *x, int *y)
|
||||
struct frame *sf = SELECTED_FRAME ();
|
||||
if (f == sf || frame_ancestor_p (sf, f))
|
||||
{
|
||||
int mx = XFIXNUM (XCAR (XCDR (mouse)));
|
||||
int my = XFIXNUM (XCDR (XCDR (mouse)));
|
||||
root_xy (f, mx, my, x, y);
|
||||
Lisp_Object lmx = XCAR (XCDR (mouse)), lmy = XCDR (XCDR (mouse));
|
||||
if (FIXNUMP (lmx) && FIXNUMP (lmy))
|
||||
{
|
||||
int mx = XFIXNUM (lmx);
|
||||
int my = XFIXNUM (lmy);
|
||||
root_xy (f, mx, my, x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user