From 1a928f638c16a7d4aa2d8dafeb6da9402fed1660 Mon Sep 17 00:00:00 2001 From: Christoph Hohmann Date: Fri, 3 Jan 2014 18:15:50 +0100 Subject: [PATCH] Don't close module if opening failed during graphics initialization --- libobs/graphics/graphics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libobs/graphics/graphics.c b/libobs/graphics/graphics.c index 2226b5215..13915f555 100644 --- a/libobs/graphics/graphics.c +++ b/libobs/graphics/graphics.c @@ -159,7 +159,8 @@ void gs_destroy(graphics_t graphics) pthread_mutex_destroy(&graphics->mutex); da_free(graphics->matrix_stack); da_free(graphics->viewport_stack); - os_dlclose(graphics->module); + if (graphics->module) + os_dlclose(graphics->module); bfree(graphics); }