[epiphany/wip/exalm/tab-fix] 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] tab-view: Make sure it's kept alive with HdyTabView
- Date: Mon, 22 Aug 2022 19:51:23 +0000 (UTC)
commit 295c6bbe8f3a209183e95cf5da175d9d97793181
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]