summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-29 18:50:30 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-03-29 18:57:06 +0100
commit69c54cdabb5771125b98d6bc94d2d674e16ac3ed (patch)
tree0d70618543b74a56625f7daccd1e0e1e8c9780fa /src/lib/eina
parentb8952604ce1921fbd44dad46c88de456abefe430 (diff)
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
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eina/eina_log.c b/src/lib/eina/eina_log.c
index 52cf8f98ac..b6c5632267 100644
--- a/src/lib/eina/eina_log.c
+++ b/src/lib/eina/eina_log.c
@@ -1720,7 +1720,10 @@ eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data)
1720{ 1720{
1721#ifdef EINA_ENABLE_LOG 1721#ifdef EINA_ENABLE_LOG
1722 LOG_LOCK(); 1722 LOG_LOCK();
1723 _print_cb = cb; 1723 if (cb)
1724 _print_cb = cb;
1725 else
1726 _print_cb = eina_log_print_cb_stderr;
1724 _print_cb_data = data; 1727 _print_cb_data = data;
1725 eina_log_print_prefix_update(); 1728 eina_log_print_prefix_update();
1726 LOG_UNLOCK(); 1729 LOG_UNLOCK();