mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-10 22:15:37 +00:00
wayland: Read window
data only if window
is valid
This commit is contained in:
parent
b75d318776
commit
70a41f9bc2
|
@ -590,11 +590,11 @@ pointer_handle_button_common(struct SDL_WaylandInput *input, uint32_t serial,
|
||||||
uint32_t time, uint32_t button, uint32_t state_w)
|
uint32_t time, uint32_t button, uint32_t state_w)
|
||||||
{
|
{
|
||||||
SDL_WindowData *window = input->pointer_focus;
|
SDL_WindowData *window = input->pointer_focus;
|
||||||
SDL_VideoData *viddata = window->waylandData;
|
|
||||||
enum wl_pointer_button_state state = state_w;
|
enum wl_pointer_button_state state = state_w;
|
||||||
uint32_t sdl_button;
|
uint32_t sdl_button;
|
||||||
|
|
||||||
if (window) {
|
if (window) {
|
||||||
|
SDL_VideoData *viddata = window->waylandData;
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case BTN_LEFT:
|
case BTN_LEFT:
|
||||||
sdl_button = SDL_BUTTON_LEFT;
|
sdl_button = SDL_BUTTON_LEFT;
|
||||||
|
|
Loading…
Reference in a new issue