wayland: fix NULL dereference in wl_pointer_query_full
wWorkspaceForceChange passes NULL for root_x/root_y when it only needs the child window. Add NULL checks before dereferencing these pointers.
This commit is contained in:
parent
5e60df9f3a
commit
172e226947
|
|
@ -6223,8 +6223,8 @@ wl_pointer_query_full(WNativeWindow root,
|
|||
/* Phase 54: return tracked virtual pointer position. */
|
||||
(void)root;
|
||||
if (child_out) *child_out = WNATIVE_NONE;
|
||||
*root_x = wl_state.pointer_x;
|
||||
*root_y = wl_state.pointer_y;
|
||||
if (root_x) *root_x = wl_state.pointer_x;
|
||||
if (root_y) *root_y = wl_state.pointer_y;
|
||||
if (buttons_out) *buttons_out = 0;
|
||||
return wl_state.started ? 1 : 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue