From ae8fc9922eb51ce8628f3e3333d1fe817518ca76 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sun, 22 Nov 2020 23:08:33 +0100 Subject: lavfi/vulkan: allow calling glslang_uninit without a prior init Allows us to uninit cleanly. This assert was also somewhat pointless as we assert every other function, so another assert would be triggered long before this one is. --- libavfilter/glslang.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavfilter/glslang.cpp') diff --git a/libavfilter/glslang.cpp b/libavfilter/glslang.cpp index 125eb5c364..986bddd789 100644 --- a/libavfilter/glslang.cpp +++ b/libavfilter/glslang.cpp @@ -235,8 +235,7 @@ int glslang_init(void) void glslang_uninit(void) { pthread_mutex_lock(&glslang_mutex); - av_assert0(glslang_refcount > 0); - if (--glslang_refcount == 0) + if (glslang_refcount && (--glslang_refcount == 0)) FinalizeProcess(); pthread_mutex_unlock(&glslang_mutex); } -- cgit v1.2.3