Commit b5b0485b authored by Philip Withnall's avatar Philip Withnall

Merge branch '1459-async-queue-precondition' into 'master'

Resolve "Missing g_return_val_if_fail in g_async_queue_timeout_pop"

Closes #1459

See merge request GNOME/glib!201
parents 2d7423b9 ef1d2497
......@@ -539,6 +539,8 @@ g_async_queue_timeout_pop (GAsyncQueue *queue,
gint64 end_time = g_get_monotonic_time () + timeout;
gpointer retval;
g_return_val_if_fail (queue != NULL, NULL);
g_mutex_lock (&queue->mutex);
retval = g_async_queue_pop_intern_unlocked (queue, TRUE, end_time);
g_mutex_unlock (&queue->mutex);
......@@ -567,6 +569,8 @@ g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue,
{
gint64 end_time = g_get_monotonic_time () + timeout;
g_return_val_if_fail (queue != NULL, NULL);
return g_async_queue_pop_intern_unlocked (queue, TRUE, end_time);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment