From d77c2fb52cf2782842d2e93110b9635552ef4172 Mon Sep 17 00:00:00 2001 From: Michael Tyson Date: Tue, 14 Jun 2016 13:29:24 +1000 Subject: [PATCH] AERealtimeWatchdog: don't warn on free(NULL) --- TheAmazingAudioEngine/Utilities/AERealtimeWatchdog.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TheAmazingAudioEngine/Utilities/AERealtimeWatchdog.m b/TheAmazingAudioEngine/Utilities/AERealtimeWatchdog.m index 399dc8d..c143682 100644 --- a/TheAmazingAudioEngine/Utilities/AERealtimeWatchdog.m +++ b/TheAmazingAudioEngine/Utilities/AERealtimeWatchdog.m @@ -132,7 +132,7 @@ typedef ssize_t (*recvfrom_t)(int socket, void *restrict buffer, size_t length, void free(void *p) { static free_t funcptr = NULL; if ( !funcptr ) funcptr = (free_t) dlsym(RTLD_NEXT, "free"); - if ( AERealtimeWatchdogIsOnRealtimeThread() ) AERealtimeWatchdogUnsafeActivityWarning("free"); + if ( p && AERealtimeWatchdogIsOnRealtimeThread() ) AERealtimeWatchdogUnsafeActivityWarning("free"); funcptr(p); }