From: John Stebbins Date: Mon, 16 Nov 2015 00:21:07 +0000 (-0800) Subject: ports: add NULL checks X-Git-Tag: 1.0.0~762 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2fb145288d94b0d87e1d4a877ceb49687e5c37b5;p=handbrake ports: add NULL checks --- 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 );