summaryrefslogtreecommitdiffstats
path: root/libhb/ports.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2015-11-15 16:21:07 -0800
committerJohn Stebbins <[email protected]>2015-11-15 16:21:07 -0800
commit2fb145288d94b0d87e1d4a877ceb49687e5c37b5 (patch)
treea3493d94ca82e0ebf8eb19e7be99b5debd9ba21b /libhb/ports.c
parentc58e6ccc49b6a6007bf64a4666e11c23334b191b (diff)
ports: add NULL checks
Diffstat (limited to 'libhb/ports.c')
-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 );