glib r7213 - branches/glib-2-16/gio
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7213 - branches/glib-2-16/gio
- Date: Sun, 20 Jul 2008 02:49:45 +0000 (UTC)
Author: matthiasc
Date: Sun Jul 20 02:49:45 2008
New Revision: 7213
URL: http://svn.gnome.org/viewvc/glib?rev=7213&view=rev
Log:
Bug 543040 â async reading on dummy file will crash on
GIO_USE_VFS=local
* gfile.c (open_read_async_thread): Cope with read_fn being
NULL. Reported by Lin Ma.
Modified:
branches/glib-2-16/gio/ChangeLog
branches/glib-2-16/gio/gfile.c
Modified: branches/glib-2-16/gio/gfile.c
==============================================================================
--- branches/glib-2-16/gio/gfile.c (original)
+++ branches/glib-2-16/gio/gfile.c Sun Jul 20 02:49:45 2008
@@ -4012,6 +4012,18 @@
iface = G_FILE_GET_IFACE (object);
+ if (iface->read_fn == NULL)
+ {
+ g_set_error_literal (error, G_IO_ERROR,
+ G_IO_ERROR_NOT_SUPPORTED,
+ _("Operation not supported"));
+
+ g_simple_async_result_set_from_error (res, error);
+ g_error_free (error);
+
+ return;
+ }
+
stream = iface->read_fn (G_FILE (object), cancellable, &error);
if (stream == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]