wayland/transaction: Handle NULL from->state in entry_merge_into

This never happened so far, but it will with following commits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3364>
This commit is contained in:
Michel Dänzer 2023-11-01 17:51:38 +01:00 committed by Marge Bot
parent 0807579cdd
commit 0bd40968ab

View File

@ -496,14 +496,18 @@ meta_wayland_transaction_entry_merge_into (MetaWaylandTransactionEntry *from,
to->has_sub_pos = TRUE;
}
if (to->state)
if (from->state)
{
meta_wayland_surface_state_merge_into (from->state, to->state);
g_clear_object (&from->state);
return;
if (to->state)
{
meta_wayland_surface_state_merge_into (from->state, to->state);
g_clear_object (&from->state);
}
else
{
to->state = g_steal_pointer (&from->state);
}
}
to->state = g_steal_pointer (&from->state);
}
void