Make g_log_set_writer_func work more than once

It is fine to document that you shall only call this once,
but for tests, it is important that we can call it multiple
times.
This commit is contained in:
Matthias Clasen 2016-07-22 15:10:36 -04:00
parent 97a38dc586
commit e7ee56dd1d

View File

@ -1582,7 +1582,6 @@ g_log_set_writer_func (GLogWriterFunc func,
GDestroyNotify user_data_free) GDestroyNotify user_data_free)
{ {
g_return_if_fail (func != NULL); g_return_if_fail (func != NULL);
g_return_if_fail (log_writer_func == g_log_writer_default);
g_mutex_lock (&g_messages_lock); g_mutex_lock (&g_messages_lock);
log_writer_func = func; log_writer_func = func;