overlay: Don't access priv pointer before typ check

This commit is contained in:
Timm Bäder 2016-01-23 10:30:53 +01:00
parent 8096740ea4
commit ddbafa023a

View File

@ -868,12 +868,13 @@ void
gtk_overlay_add_overlay (GtkOverlay *overlay, gtk_overlay_add_overlay (GtkOverlay *overlay,
GtkWidget *widget) GtkWidget *widget)
{ {
GtkOverlayPrivate *priv = overlay->priv; GtkOverlayPrivate *priv;
GtkOverlayChild *child; GtkOverlayChild *child;
g_return_if_fail (GTK_IS_OVERLAY (overlay)); g_return_if_fail (GTK_IS_OVERLAY (overlay));
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
priv = overlay->priv;
child = g_slice_new0 (GtkOverlayChild); child = g_slice_new0 (GtkOverlayChild);
child->widget = widget; child->widget = widget;