From 12e27a4f769af27b9eca9702f9b0115ebb508d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Sat, 10 Nov 2012 21:09:16 +0100 Subject: [PATCH] check for dest being null --- src/ucore_logging.c | 5 +++++ 1 file changed, 5 insertions(+) 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);