gdk: Add an assertion

We simply overwrite any previous region,
so assert that the field was NULL before.
This commit is contained in:
Matthias Clasen 2023-05-14 07:46:44 -04:00
parent e50209a535
commit 51ad2a55a8

View File

@ -711,6 +711,8 @@ gdk_texture_set_diff (GdkTexture *self,
GdkTexture *previous,
cairo_region_t *diff)
{
g_assert (self->diff_to_previous == NULL);
self->previous_texture = previous;
self->diff_to_previous = diff;
g_atomic_pointer_set (&previous->next_texture, self);