forked from enlightenment/efl
eina_log: reset logging callback to default when null is set as the callback
Summary: passing null here causes any log message to crash the app and is probably not the intended result Reviewers: cedric, segfaultxavi Reviewed By: cedric, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8513
This commit is contained in:
parent
b8952604ce
commit
69c54cdabb
|
@ -1720,7 +1720,10 @@ eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data)
|
|||
{
|
||||
#ifdef EINA_ENABLE_LOG
|
||||
LOG_LOCK();
|
||||
_print_cb = cb;
|
||||
if (cb)
|
||||
_print_cb = cb;
|
||||
else
|
||||
_print_cb = eina_log_print_cb_stderr;
|
||||
_print_cb_data = data;
|
||||
eina_log_print_prefix_update();
|
||||
LOG_UNLOCK();
|
||||
|
|
Loading…
Reference in New Issue