[epiphany/wip/exalm/gtk4-overview: 12/13] 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: 12/13] tab-view: Make sure it's kept alive with HdyTabView
- Date: Tue, 23 Aug 2022 23:40:50 +0000 (UTC)
commit b1cce831f3f7ab3cba866df48030be8e3740681f
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 c168413b7..b80c4e6e5 100644
--- a/src/ephy-tab-view.c
+++ b/src/ephy-tab-view.c
@@ -151,7 +151,8 @@ ephy_tab_view_init (EphyTabView *self)
{
self->tab_view = ADW_TAB_VIEW (adw_tab_view_new ());
- 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);
adw_bin_set_child (ADW_BIN (self), GTK_WIDGET (self->tab_view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]