Преглед изворни кода

libobs: (Re-)Move (duplicate) graphics mutex init

This probably fixes the crash from "libobs: Check effect mutex exists
before destroying it" (c2c47b1169b272498bdd6ffb1416f6d518200059)
Palana пре 10 година
родитељ
комит
f9eeb049fa
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      libobs/graphics/graphics.c

+ 1 - 3
libobs/graphics/graphics.c

@@ -115,9 +115,6 @@ static bool graphics_init(struct graphics_subsystem *graphics)
 
 	graphics->exports.device_enter_context(graphics->device);
 
-	pthread_mutex_init_value(&graphics->mutex);
-	pthread_mutex_init_value(&graphics->effect_mutex);
-
 	if (!graphics_init_immediate_vb(graphics))
 		return false;
 	if (!graphics_init_sprite_vb(graphics))
@@ -150,6 +147,7 @@ int gs_create(graphics_t **pgraphics, const char *module,
 
 	graphics_t *graphics = bzalloc(sizeof(struct graphics_subsystem));
 	pthread_mutex_init_value(&graphics->mutex);
+	pthread_mutex_init_value(&graphics->effect_mutex);
 
 	if (!new_data.num_backbuffers)
 		new_data.num_backbuffers = 1;