--- gdk-support.c.~1.30.~ 2003-08-05 10:32:59.000000000 +1000 +++ gdk-support.c 2003-08-08 15:51:13.000000000 +1000 @@ -30,18 +30,24 @@ gdk_selection_property_get_interp (GdkWindow *requestor, GdkAtom *prop_type, int *prop_format) { - /* We need to initialize data to NULL because the GDK function returns - * a random value in data if requestor has been destroyed. */ - guchar *data = NULL; + guchar *data; int length; + + /* When the requestor window has been destroyed, it looks like + gdk_selection_property_get doesn't store anything in its return + locations. Initialize here to be sure. */ + data = NULL; + *prop_type = GTK_NONE; + *prop_format = 0; + length = gdk_selection_property_get (requestor, &data, prop_type, prop_format); /* Note: While we are returning a string, the data may actually be * anything and contain zeros. */ - if (data) return scm_take_str (data, length); - *prop_type = GDK_NONE; - *prop_format = 8; - return SCM_BOOL_F; + if (data) + return scm_take_str (data, length); + else + return SCM_BOOL_F; } #define FUNCNAME "gdk-property-change"