diff --git a/src/ucore_logging.c b/src/ucore_logging.c index 8d16dc1..df13ef1 100644 --- a/src/ucore_logging.c +++ b/src/ucore_logging.c @@ -170,6 +170,9 @@ void uc_log_add_destination(struct uc_log_destination *dest) { struct uc_log_destination *it; + if(dest == NULL) + return; + pthread_mutex_lock(&log_lock); //make sure the destination isn't added twice. @@ -204,6 +207,8 @@ static inline void uc_log_remove_dest_unlocked(struct uc_log_destination *dest) void uc_log_remove_destination(struct uc_log_destination *dest) { + if(dest == NULL) + return; pthread_mutex_lock(&log_lock);