[uwac] input: fix a crash when the pointer_focus is not set yet when starting

This commit is contained in:
Mariusz Bialonczyk
2024-01-02 19:55:19 +01:00
committed by akallabeth
parent 72b6c7096d
commit d56af70dc1

View File

@@ -102,7 +102,10 @@ static UwacReturnCode set_cursor_image(UwacSeat* seat, uint32_t serial)
if (!seat || !seat->display || !seat->default_cursor || !seat->default_cursor->images)
return UWAC_ERROR_INTERNAL;
int scale = seat->pointer_focus->display->actual_scale;
int scale = 1;
if (seat->pointer_focus)
scale = seat->pointer_focus->display->actual_scale;
switch (seat->pointer_type)
{
case 2: /* Custom poiner */