mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
Bug 543040 – async reading on dummy file will crash on GIO_USE_VFS=local
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. svn path=/branches/glib-2-16/; revision=7213
This commit is contained in:
parent
a5ccc1fff1
commit
4e9d1673e4
@ -1,3 +1,13 @@
|
||||
2008-07-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from trunk:
|
||||
|
||||
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.
|
||||
|
||||
2008-07-19 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Merge from trunk:
|
||||
|
12
gio/gfile.c
12
gio/gfile.c
@ -4012,6 +4012,18 @@ open_read_async_thread (GSimpleAsyncResult *res,
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user