main: fix coverity error in _mesa_program_resource_find_name()
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 8 Jan 2020 18:12:53 +0000 (19:12 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 10 Jan 2020 07:40:00 +0000 (08:40 +0100)
commit39c1892dd82e6a52cb6d7ea100dfee877bd4aa2c
tree418b9da3282ea0fb62666985d34d8ccb622c6eca
parentf2f12776248874b2a689cbba8faeb6e4e2144354
main: fix coverity error in _mesa_program_resource_find_name()

We did not take into account if name is NULL, so we could dereference
a NULL pointer in strncmp() call.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/shader_query.cpp