[libhandy/tabs: 13/62] Fix a use-after-free
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/tabs: 13/62] Fix a use-after-free
- Date: Sat, 12 Sep 2020 19:27:43 +0000 (UTC)
commit a59c78243ecb05c49b85292a39e25b50ba7bef1d
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Sep 5 04:03:01 2020 +0500
Fix a use-after-free
src/hdy-tab-box.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/hdy-tab-box.c b/src/hdy-tab-box.c
index 37aa5c26..cedfb7de 100644
--- a/src/hdy-tab-box.c
+++ b/src/hdy-tab-box.c
@@ -1548,6 +1548,9 @@ remove_page (HdyTabBox *self,
info->page = NULL;
+ if (info->appear_animation)
+ hdy_animation_stop (info->appear_animation);
+
info->appear_animation =
hdy_animation_new (GTK_WIDGET (self), info->appear_progress, 0,
CLOSE_ANIMATION_DURATION,
@@ -1712,6 +1715,8 @@ remove_animation_done_cb (gpointer user_data)
GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (info->tab));
HdyTabBox *self = HDY_TAB_BOX (parent);
+ g_clear_object (&info->appear_animation);
+
if (!self->can_remove_placeholder) {
hdy_tab_set_page (info->tab, self->placeholder_page);
info->page = self->placeholder_page;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]