[epiphany] web-view: properly remove password info bar weak pointer



commit 4218960c4a6ec4a9f646fa36e12f099eafcb92e6
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Aug 7 21:24:17 2016 -0500

    web-view: properly remove password info bar weak pointer

 embed/ephy-web-view.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index d7135a1..92ac559 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -517,10 +517,13 @@ ephy_web_view_create_form_auth_save_confirmation_info_bar (EphyWebView *web_view
   ephy_embed_add_top_widget (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view),
                              info_bar, FALSE);
 
-  /* We track the info_bar, so we only ever show one */
-  if (web_view->password_info_bar)
+  if (web_view->password_info_bar) {
+    g_object_remove_weak_pointer (G_OBJECT (web_view->password_info_bar),
+                                  (gpointer *)&web_view->password_info_bar);
     gtk_widget_destroy (web_view->password_info_bar);
+  }
 
+  /* We track the info_bar, so we only ever show one */
   web_view->password_info_bar = info_bar;
   g_object_add_weak_pointer (G_OBJECT (info_bar),
                              (gpointer *)&web_view->password_info_bar);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]