[gtk/gtk-3-24: 1/2] Fix: GTK Switch crash under Windows, on exit.
- From: Luca Bacci <lbacci src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/2] Fix: GTK Switch crash under Windows, on exit.
- Date: Mon, 27 Dec 2021 20:39:06 +0000 (UTC)
commit 1ce49e48b26c1f52c183eeaee5f1795f2e280e6f
Author: Melroy van den Berg <melroy melroy org>
Date: Mon Dec 27 20:39:04 2021 +0000
Fix: GTK Switch crash under Windows, on exit.
gtk/gtkswitch.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 002968e14e..8a4aa72ca2 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -812,11 +812,6 @@ gtk_switch_dispose (GObject *object)
priv->action = NULL;
}
- g_clear_object (&priv->gadget);
- g_clear_object (&priv->slider_gadget);
- g_clear_object (&priv->on_gadget);
- g_clear_object (&priv->off_gadget);
-
g_clear_object (&priv->pan_gesture);
g_clear_object (&priv->multipress_gesture);
@@ -826,8 +821,14 @@ gtk_switch_dispose (GObject *object)
static void
gtk_switch_finalize (GObject *object)
{
+ GtkSwitchPrivate *priv = GTK_SWITCH (object)->priv;
gtk_switch_end_toggle_animation (GTK_SWITCH (object));
+ g_clear_object (&priv->gadget);
+ g_clear_object (&priv->slider_gadget);
+ g_clear_object (&priv->on_gadget);
+ g_clear_object (&priv->off_gadget);
+
G_OBJECT_CLASS (gtk_switch_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]