summaryrefslogtreecommitdiff
path: root/gtk/gtkoverlay.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2016-01-23 10:30:53 +0100
committerTimm Bäder <mail@baedert.org>2016-01-23 10:30:53 +0100
commitddbafa023aea4ba340731a07def111ad228dfa34 (patch)
tree71b751974675f3cb3240ac919bb6772f625f62a2 /gtk/gtkoverlay.c
parent8096740ea4d8cdbff315152dfc06d55f1801f2eb (diff)
downloadgtk+-ddbafa023aea4ba340731a07def111ad228dfa34.tar.gz
overlay: Don't access priv pointer before typ check
Diffstat (limited to 'gtk/gtkoverlay.c')
-rw-r--r--gtk/gtkoverlay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c
index 661f3d10d6..b9208a9d7c 100644
--- a/gtk/gtkoverlay.c
+++ b/gtk/gtkoverlay.c
@@ -868,12 +868,13 @@ void
gtk_overlay_add_overlay (GtkOverlay *overlay,
GtkWidget *widget)
{
- GtkOverlayPrivate *priv = overlay->priv;
+ GtkOverlayPrivate *priv;
GtkOverlayChild *child;
g_return_if_fail (GTK_IS_OVERLAY (overlay));
g_return_if_fail (GTK_IS_WIDGET (widget));
+ priv = overlay->priv;
child = g_slice_new0 (GtkOverlayChild);
child->widget = widget;