summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2018-01-10 16:53:09 +0100
committerDamiano Galassi <[email protected]>2018-01-10 16:53:09 +0100
commitf419e5a786c659727f9e5d91b2aed7127b6d71be (patch)
tree28643040f372c750ff27e249c87be72731690262 /libhb
parent059bd17f3360400f0675225919abf6b558a17a60 (diff)
ports: fix a possible null deference.
Diffstat (limited to 'libhb')
-rw-r--r--libhb/ports.c2
1 files changed, 2 insertions, 0 deletions
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;