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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user