From f419e5a786c659727f9e5d91b2aed7127b6d71be Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Wed, 10 Jan 2018 16:53:09 +0100 Subject: [PATCH] ports: fix a possible null deference. --- libhb/ports.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.40.0