mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
g_cancellable_release_fd: allow NULL cancellable
Almost all GCancellable methods silently do nothing if passed NULL for the cancellable. Make g_cancellable_release_fd() do that as well.
This commit is contained in:
@@ -579,6 +579,9 @@ g_cancellable_release_fd (GCancellable *cancellable)
|
||||
{
|
||||
GCancellablePrivate *priv;
|
||||
|
||||
if (cancellable == NULL)
|
||||
return;
|
||||
|
||||
g_return_if_fail (G_IS_CANCELLABLE (cancellable));
|
||||
g_return_if_fail (cancellable->priv->fd_refcount > 0);
|
||||
|
||||
|
Reference in New Issue
Block a user