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.
Unified · Split
| @@ -235,8 +235,7 @@ int glslang_init(void) · 234 unmodified lines | |||
| 235 | void glslang_uninit(void) | 235 | void glslang_uninit(void) |
| 236 | { | 236 | { |
| 237 | pthread_mutex_lock(&glslang_mutex); | 237 | pthread_mutex_lock(&glslang_mutex); |
| 238 | av_assert0(glslang_refcount > 0); | 238 | if (glslang_refcount && (--glslang_refcount == 0)) |
| 239 | if (--glslang_refcount == 0) | ||
| 240 | FinalizeProcess(); | 239 | FinalizeProcess(); |
| 241 | pthread_mutex_unlock(&glslang_mutex); | 240 | pthread_mutex_unlock(&glslang_mutex); |
| 242 | } | 241 | } |