[epiphany/wip/exalm/gtk4-overview: 1/4] 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/gtk4-overview: 1/4] tab-view: Make sure it's kept alive with HdyTabView
- Date: Mon, 22 Aug 2022 19:55:20 +0000 (UTC)
commit fb44c9a7c3b9fb3317b18373e9d487146ad3c7ff
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]