check for dest being null

This commit is contained in:
Nils O. Selåsdal
2012-11-10 21:09:16 +01:00
parent 59e31761c3
commit 12e27a4f76
+5
View File
@@ -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);