From 1c37200549ee420c548304c982b28dff5b9c7f42 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 30 May 2016 16:03:01 -0700 Subject: [PATCH] libobs/util: Check for null pointer before calling dlclose Apparently dlclose can crash if you use it with a null pointer. --- libobs/util/platform-nix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libobs/util/platform-nix.c b/libobs/util/platform-nix.c index e1bc92157..e505eabaf 100644 --- a/libobs/util/platform-nix.c +++ b/libobs/util/platform-nix.c @@ -68,7 +68,8 @@ void *os_dlsym(void *module, const char *func) void os_dlclose(void *module) { - dlclose(module); + if (module) + dlclose(module); } #if !defined(__APPLE__)