[epiphany/wip/exalm/tab-fix: 13/15] tab-view: Make sure it's kept alive with HdyTabView
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/exalm/tab-fix: 13/15] tab-view: Make sure it's kept alive with HdyTabView
- Date: Mon, 29 Aug 2022 13:20:06 +0000 (UTC)
commit 1266185aacb2ff8ec44813b897cdff8eb43e32e3
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Aug 22 23:48:40 2022 +0400
tab-view: Make sure it's kept alive with HdyTabView
The latter has a way to get EphyTabView from it; if EphyTabView is disposed
first, we get a use-after-free.
src/ephy-tab-view.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/ephy-tab-view.c b/src/ephy-tab-view.c
index e2c785892..d29846cbd 100644
--- a/src/ephy-tab-view.c
+++ b/src/ephy-tab-view.c
@@ -153,7 +153,8 @@ ephy_tab_view_init (EphyTabView *self)
self->tab_view = HDY_TAB_VIEW (hdy_tab_view_new ());
gtk_widget_show (GTK_WIDGET (self->tab_view));
- g_object_set_data (G_OBJECT (self->tab_view), "ephy-tab-view", self);
+ g_object_set_data_full (G_OBJECT (self->tab_view), "ephy-tab-view",
+ g_object_ref (self), g_object_unref);
gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->tab_view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]