mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 12:25:48 +01:00
g_cancellable_get_fd: silently return -1 for NULL cancellable
This keeps compatibility with previous behavior. https://bugzilla.gnome.org/show_bug.cgi?id=655598 Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
parent
659ba3d0b3
commit
ee63179b71
@ -348,6 +348,9 @@ g_cancellable_get_fd (GCancellable *cancellable)
|
|||||||
{
|
{
|
||||||
GPollFD pollfd;
|
GPollFD pollfd;
|
||||||
|
|
||||||
|
if (cancellable == NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
pollfd.fd = -1;
|
pollfd.fd = -1;
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user