
Index: gal/a11y/e-paned/gal-a11y-e-paned.c
===================================================================
RCS file: /cvs/gnome/gal/gal/a11y/e-paned/Attic/gal-a11y-e-paned.c,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 gal-a11y-e-paned.c
--- gal/a11y/e-paned/gal-a11y-e-paned.c	15 Jul 2003 06:34:20 -0000	1.1.2.1
+++ gal/a11y/e-paned/gal-a11y-e-paned.c	17 Jul 2003 11:24:09 -0000
@@ -174,6 +174,8 @@
   AtkStateSet *state_set;
   GtkWidget *widget;
 
+  g_return_val_if_fail (GTK_IS_ACCESSIBLE (accessible), NULL);
+
   state_set = ATK_OBJECT_CLASS (parent_class)->ref_state_set (accessible);
   widget = GTK_ACCESSIBLE (accessible)->widget;
 
@@ -216,16 +218,18 @@
   GtkWidget* widget;
   gint current_value;
 
+  memset (value,  0, sizeof (GValue));
+  g_value_init (value, G_TYPE_INT);
+
+  g_return_val_if_fail (GTK_IS_ACCESSIBLE (obj), NULL);
+
   widget = GTK_ACCESSIBLE (obj)->widget;
   if (widget == NULL)
     /* State is defunct */
     return;
-  
 
   current_value = e_paned_get_position (E_PANED (widget));
 
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_INT);
   g_value_set_int (value,current_value);
 }
 
@@ -236,15 +240,16 @@
   GtkWidget* widget;
   gint maximum_value;
 
+  memset (value,  0, sizeof (GValue));
+  g_value_init (value, G_TYPE_INT);
+  g_return_val_if_fail (GTK_IS_ACCESSIBLE (obj), NULL);
+
   widget = GTK_ACCESSIBLE (obj)->widget;
   if (widget == NULL)
     /* State is defunct */
     return;
 
   maximum_value = E_PANED (widget)->max_position;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_INT);
   g_value_set_int (value, maximum_value);
 }
 
@@ -255,15 +260,16 @@
   GtkWidget* widget;
   gint minimum_value;
 
+  memset (value,  0, sizeof (GValue));
+  g_value_init (value, G_TYPE_INT);
+  g_return_val_if_fail (GTK_IS_ACCESSIBLE (obj), NULL);
+
   widget = GTK_ACCESSIBLE (obj)->widget;
   if (widget == NULL)
     /* State is defunct */
     return;
 
   minimum_value = E_PANED (widget)->min_position;
-
-  memset (value,  0, sizeof (GValue));
-  g_value_init (value, G_TYPE_INT);
   g_value_set_int (value, minimum_value);
 }
 
@@ -280,6 +286,8 @@
 {
   GtkWidget* widget;
   gint new_value;
+
+  g_return_val_if_fail (GTK_IS_ACCESSIBLE (obj), NULL);
 
   widget = GTK_ACCESSIBLE (obj)->widget;
   if (widget == NULL)
