diff --git a/src/vrend_decode.c b/src/vrend_decode.c index cab3956..11ac1ed 100644 --- a/src/vrend_decode.c +++ b/src/vrend_decode.c @@ -1093,6 +1093,11 @@ void vrend_renderer_context_destroy(uint32_t handle) if (handle >= VREND_MAX_CTX) return; + /* never destroy context 0 here, it will be destroyed in vrend_decode_reset()*/ + if (handle == 0) { + return; + } + ctx = dec_ctx[handle]; if (!ctx) return;