aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-embed-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'embed/ephy-embed-dialog.c')
-rw-r--r--embed/ephy-embed-dialog.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/embed/ephy-embed-dialog.c b/embed/ephy-embed-dialog.c
index 4c13165d7..c059afedc 100644
--- a/embed/ephy-embed-dialog.c
+++ b/embed/ephy-embed-dialog.c
@@ -115,8 +115,10 @@ unset_embed (EphyEmbedDialog *dialog)
{
if (dialog->priv->embed != NULL)
{
+ EphyEmbed **embedptr;
+ embedptr = &dialog->priv->embed;
g_object_remove_weak_pointer (G_OBJECT (dialog->priv->embed),
- (gpointer *)&dialog->priv->embed);
+ (gpointer *) embedptr);
}
}
@@ -185,10 +187,14 @@ void
ephy_embed_dialog_set_embed (EphyEmbedDialog *dialog,
EphyEmbed *embed)
{
+ EphyEmbed **embedptr;
+
unset_embed (dialog);
dialog->priv->embed = embed;
+
+ embedptr = &dialog->priv->embed;
g_object_add_weak_pointer (G_OBJECT (dialog->priv->embed),
- (gpointer *)&dialog->priv->embed);
+ (gpointer *) embedptr);
g_object_notify (G_OBJECT (dialog), "embed");
}