Commit cbb0d7ba authored by Daniel Boles's avatar Daniel Boles

Merge branch 'master' into 'master'

gtkstack: fix null pointer dereference

See merge request !361
parents cbdb744c 44655932
Pipeline #34419 passed with stages
in 29 minutes
......@@ -1910,11 +1910,14 @@ gtk_stack_snapshot_slide (GtkWidget *widget,
break;
}
if (gtk_widget_get_valign (priv->last_visible_child->widget) == GTK_ALIGN_END &&
priv->last_visible_widget_height > height)
y -= priv->last_visible_widget_height - height;
else if (gtk_widget_get_valign (priv->last_visible_child->widget) == GTK_ALIGN_CENTER)
y -= (priv->last_visible_widget_height - height) / 2;
if (priv->last_visible_child != NULL)
{
if (gtk_widget_get_valign (priv->last_visible_child->widget) == GTK_ALIGN_END &&
priv->last_visible_widget_height > height)
y -= priv->last_visible_widget_height - height;
else if (gtk_widget_get_valign (priv->last_visible_child->widget) == GTK_ALIGN_CENTER)
y -= (priv->last_visible_widget_height - height) / 2;
}
gtk_snapshot_offset (snapshot, x, y);
gtk_snapshot_append_node (snapshot, priv->last_visible_node);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment