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.
Showing the changes to libavfilter/glslang.cpp (1 of 1 file). Show all
Unified · Split
| @@ -235,8 +235,7 @@ int glslang_init(void) · 234 unmodified lines | ||
| 235 | 235 | void glslang_uninit(void) |
| 236 | 236 | { |
| 237 | 237 | pthread_mutex_lock(&glslang_mutex); |
| 238 | − av_assert0(glslang_refcount > 0); | |
| 239 | − if (--glslang_refcount == 0) | |
| 238 | + if (glslang_refcount && (--glslang_refcount == 0)) | |
| 240 | 239 | FinalizeProcess(); |
| 241 | 240 | pthread_mutex_unlock(&glslang_mutex); |
| 242 | 241 | } |