Fix crash trying to update seat cursor outputs
* seat.c (UpdateCursorOutput): Do not update if the surface has been destroyed.
This commit is contained in:
parent
01a957737b
commit
1b02ff9833
1 changed files with 5 additions and 0 deletions
5
seat.c
5
seat.c
|
@ -885,6 +885,11 @@ UpdateCursorOutput (SeatCursor *cursor, int root_x, int root_y)
|
||||||
{
|
{
|
||||||
int hotspot_x, hotspot_y;
|
int hotspot_x, hotspot_y;
|
||||||
|
|
||||||
|
if (!cursor->role.surface)
|
||||||
|
/* The surface has been destroyed, so there is no point in
|
||||||
|
continuing. */
|
||||||
|
return;
|
||||||
|
|
||||||
/* Scale the hotspot coordinates up by the scale factor specified in
|
/* Scale the hotspot coordinates up by the scale factor specified in
|
||||||
the surface. */
|
the surface. */
|
||||||
hotspot_x = cursor->hotspot_x * cursor->role.surface->factor;
|
hotspot_x = cursor->hotspot_x * cursor->role.surface->factor;
|
||||||
|
|
Loading…
Add table
Reference in a new issue