mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01: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:
parent
644dfbd704
commit
622916b731
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user