st/nine: Add missing NULL checks
authorAxel Davy <davyaxel0@gmail.com>
Thu, 7 May 2020 21:28:59 +0000 (23:28 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 15 May 2020 15:43:57 +0000 (15:43 +0000)
commit4cf13691beb4237a8a449dd317561066df492842
treec8247a76a4c6cbba53a28eede0e7b9daf760a278
parent725ebc4657d27349ed586e5c178d5b1a971587cd
st/nine: Add missing NULL checks

Ideally apps shouldn't make buggy calls.
Still if some do, let's avoid crashing.

Without this patch, if some calls are invalid,
for example if replaying a trace of a game needing
a lot of VRAM on a card with not much VRAM, it can
crash.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5015>
src/gallium/frontends/nine/device9.c