summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/ports.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libhb/ports.c b/libhb/ports.c
index b23f1ff32..3b8dcf323 100644
--- a/libhb/ports.c
+++ b/libhb/ports.c
@@ -998,6 +998,10 @@ void hb_lock_close( hb_lock_t ** _l )
{
hb_lock_t * l = *_l;
+ if (l == NULL)
+ {
+ return;
+ }
#if defined( SYS_BEOS )
delete_sem( l->sem );
#elif USE_PTHREAD
@@ -1077,6 +1081,10 @@ void hb_cond_close( hb_cond_t ** _c )
{
hb_cond_t * c = *_c;
+ if (c == NULL)
+ {
+ return;
+ }
#if defined( SYS_BEOS )
#elif USE_PTHREAD
pthread_cond_destroy( &c->cond );