check for dest being null
This commit is contained in:
@@ -170,6 +170,9 @@ void uc_log_add_destination(struct uc_log_destination *dest)
|
|||||||
{
|
{
|
||||||
struct uc_log_destination *it;
|
struct uc_log_destination *it;
|
||||||
|
|
||||||
|
if(dest == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
pthread_mutex_lock(&log_lock);
|
pthread_mutex_lock(&log_lock);
|
||||||
|
|
||||||
//make sure the destination isn't added twice.
|
//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)
|
void uc_log_remove_destination(struct uc_log_destination *dest)
|
||||||
{
|
{
|
||||||
|
if(dest == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
pthread_mutex_lock(&log_lock);
|
pthread_mutex_lock(&log_lock);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user