This ensures close() isn't called from dispose() while we're still busy
writing.
In theory this should never happen, but in practice it just did.
GTask *pending_task;
guint incr : 1;
- guint delete_pending : 1;
+ guint delete_pending : 1; /* owns a reference */
};
struct _GdkX11PendingSelectionNotify
priv->notify = NULL;
}
+ g_object_ref (stream);
priv->delete_pending = TRUE;
g_cond_broadcast (&priv->cond);
g_mutex_unlock (&priv->mutex);
if (gdk_x11_selection_output_stream_needs_flush (stream) &&
gdk_x11_selection_output_stream_can_flush (stream))
gdk_x11_selection_output_stream_perform_flush (stream);
+ g_object_unref (stream); /* from unsetting the delete_pending */
return FALSE;
default: