projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
659ba3d
)
g_cancellable_get_fd: silently return -1 for NULL cancellable
author
Owen W. Taylor
<otaylor@fishsoup.net>
Fri, 29 Jul 2011 19:38:54 +0000
(15:38 -0400)
committer
David Zeuthen
<davidz@redhat.com>
Mon, 1 Aug 2011 20:24:34 +0000
(16:24 -0400)
This keeps compatibility with previous behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=655598
Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gcancellable.c
patch
|
blob
|
history
diff --git
a/gio/gcancellable.c
b/gio/gcancellable.c
index 1c3c5b5d5266376cca05edb2f994ee6c1d769e80..8ed1b2639616a6f4c4019a1386d2f9c8acbab281 100644
(file)
--- a/
gio/gcancellable.c
+++ b/
gio/gcancellable.c
@@
-348,6
+348,9
@@
g_cancellable_get_fd (GCancellable *cancellable)
{
GPollFD pollfd;
+ if (cancellable == NULL)
+ return -1;
+
#ifdef G_OS_WIN32
pollfd.fd = -1;
#else