From: Damiano Galassi Date: Wed, 10 Jan 2018 15:53:09 +0000 (+0100) Subject: ports: fix a possible null deference. X-Git-Tag: 1.1.0~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f419e5a786c659727f9e5d91b2aed7127b6d71be;p=handbrake ports: fix a possible null deference. --- diff --git a/libhb/ports.c b/libhb/ports.c index f698dfe53..5d71541ab 100644 --- a/libhb/ports.c +++ b/libhb/ports.c @@ -1306,6 +1306,7 @@ void hb_system_sleep_private_enable(void *opaque) if (opaque == NULL) { hb_error("hb_system_sleep: opaque is NULL"); + return; } IOPMAssertionID *assertionID = (IOPMAssertionID*)opaque; @@ -1336,6 +1337,7 @@ void hb_system_sleep_private_disable(void *opaque) if (opaque == NULL) { hb_error("hb_system_sleep: opaque is NULL"); + return; } IOPMAssertionID *assertionID = (IOPMAssertionID*)opaque;