This commit was generated by cvs2svn to compensate for changes in r1705,
[chise/xemacs-chise.git.1] / src / scrollbar-x.c
index 7034321..39967fd 100644 (file)
@@ -23,6 +23,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
+/* This file Mule-ized (more like Mule-verified) by Ben Wing, 7-8-00. */
+
 #include <config.h>
 #include "lisp.h"
 
@@ -215,6 +217,7 @@ scrollbar_instance_to_widget_value (struct scrollbar_instance *instance)
   wv->scrollbar_data = xnew (scrollbar_values);
 
   wv->name = SCROLLBAR_X_NAME (instance);
+  wv->name = xstrdup (wv->name);
   wv->value = 0;
   wv->key = 0;
   wv->enabled = instance->scrollbar_is_active;
@@ -278,9 +281,7 @@ x_update_scrollbar_instance_status (struct window *w, int active, int size,
        }
 
       if (!wv->scrollbar_data) abort ();
-      xfree (wv->scrollbar_data);
-      wv->scrollbar_data = 0;
-      free_widget_value (wv);
+      free_widget_value_tree (wv);
     }
   else if (managed)
     {
@@ -407,6 +408,9 @@ x_update_vertical_scrollbar_callback (Widget widget, LWLIB_ID id,
     return;
 
   mirror = find_scrollbar_window_mirror (f, id);
+  if (!mirror)
+    return;
+
   win = real_window (mirror, 1);
 
   if (NILP (win))
@@ -610,6 +614,9 @@ x_update_horizontal_scrollbar_callback (Widget widget, LWLIB_ID id,
     return;
 
   mirror = find_scrollbar_window_mirror (f, id);
+  if (!mirror)
+    return;
+
   win = real_window (mirror, 1);
 
   if (NILP (win))