From c2c47b1169b272498bdd6ffb1416f6d518200059 Mon Sep 17 00:00:00 2001 From: Richard Stanway Date: Sat, 16 May 2015 18:44:25 +0200 Subject: [PATCH] libobs: Check effect mutex exists before destroying it Fixes a crash if graphics system didn't finish intializing. --- 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 9d8c63e09..9f965670d 100644 --- a/libobs/graphics/graphics.c +++ b/libobs/graphics/graphics.c @@ -213,7 +213,8 @@ void gs_destroy(graphics_t *graphics) } pthread_mutex_destroy(&graphics->mutex); - pthread_mutex_destroy(&graphics->effect_mutex); + if (graphics->effect_mutex) + pthread_mutex_destroy(&graphics->effect_mutex); da_free(graphics->matrix_stack); da_free(graphics->viewport_stack); da_free(graphics->blend_state_stack);