frontends/va/context: return error if context_id == 0
authorThong Thai <thong.thai@amd.com>
Thu, 11 May 2023 19:10:55 +0000 (15:10 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 16 May 2023 21:24:15 +0000 (21:24 +0000)
commit04699cc3aa1c3037b4b6d15f88e5157d31adda1a
treeab834cd92f7244d3f216d656e9ba83644681bfd5
parent63c501809e1bc3e97013e49144985243249a13d5
frontends/va/context: return error if context_id == 0

When destroying a context, check the context_id, preventing the
handle_table_get function from producing the following error:

handle_table_get: Assertion `handle' failed.

Cc: stable
Signed-off-by: Thong Thai <thong.thai@amd.com>
Tested-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22970>
src/gallium/frontends/va/context.c