[gtk+/a11y] Fix a test crash



commit 66ee762d8f628ab084f72d9ee4e4db466957b935
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 28 22:47:21 2011 -0400

    Fix a test crash

 gtk/a11y/gtkrangeaccessible.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gtk/a11y/gtkrangeaccessible.c b/gtk/a11y/gtkrangeaccessible.c
index 34b07d7..bcc0b77 100644
--- a/gtk/a11y/gtkrangeaccessible.c
+++ b/gtk/a11y/gtkrangeaccessible.c
@@ -74,12 +74,14 @@ gtk_range_accessible_finalize (GObject *object)
   GtkAdjustment *adj;
 
   widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (object));
-  adj = gtk_range_get_adjustment (GTK_RANGE (widget));
-
-  if (adj)
-    g_signal_handlers_disconnect_by_func (adj,
-                                          gtk_range_accessible_value_changed,
-                                          range);
+  if (widget)
+    {
+      adj = gtk_range_get_adjustment (GTK_RANGE (widget));
+      if (adj)
+        g_signal_handlers_disconnect_by_func (adj,
+                                              gtk_range_accessible_value_changed,
+                                              range);
+    }
 
   if (range->action_idle_handler)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]