snapshot: Avoid a double-free

We can't pass the same string to two different snapshot states since
removing one of them will free the passed string, so just create another
one for the second state.
This commit is contained in:
Timm Bäder
2017-02-14 13:23:08 +01:00
parent 6a6b6549ea
commit 08355997c2

View File

@@ -742,7 +742,7 @@ gtk_snapshot_push_blend (GtkSnapshot *snapshot,
state->data.blend.bottom_node = NULL;
state = gtk_snapshot_state_new (state,
str,
g_strdup (str),
state->clip_region,
state->translate_x,
state->translate_y,
@@ -863,7 +863,7 @@ gtk_snapshot_push_cross_fade (GtkSnapshot *snapshot,
state->data.cross_fade.start_node = NULL;
state = gtk_snapshot_state_new (state,
str,
g_strdup (str),
state->clip_region,
state->translate_x,
state->translate_y,