gallium/dri: test 'vendor_str' before dereferencing it

Test 'vendor_str' before dereferencing it to improve the robustness.
It fixes an pointer dereferencing issue seen with downstream patch [1]
on AOSP tree.

[1] https://android.googlesource.com/platform/external/mesa3d/+/48c0faf42671

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
30 jobs for !6138 with vendor_str_robustness
latest detached
Status Job ID Name Coverage
  Container+Docs
manual #3888994
aarch64 manual
arm_build
manual #3888995
manual
arm_test-base
manual #3888991
manual
x86_build-base
manual #3888993
manual
x86_build_old
manual #3888992
manual
x86_test-base
 
  Container 2
created #3889005
arm64_test
created #3889000
i386_build
created #3888996
kernel+rootfs_amd64
created #3888997
aarch64
kernel+rootfs_arm64
created #3888998
aarch64
kernel+rootfs_armhf
created #3889001
ppc64el_build
created #3889002
s390x_build
created #3888999
x86_build
created #3889003
x86_test-gl
created #3889004
x86_test-vk
 
  Meson X86 64
created #3889009
meson-clang
created #3889008
meson-classic
created #3889010
meson-clover
created #3889011
meson-clover-old-llvm
created #3889007
meson-gallium
created #3889006
meson-testing
created #3889012
meson-vulkan
 
  Scons
created #3889013
allowed to fail
scons-win64
 
  Meson Misc
created #3889015
aarch64
meson-arm64
created #3889016
aarch64
meson-arm64-build-test
created #3889014
aarch64
meson-armhf
created #3889017
meson-i386
created #3889020
meson-mingw32-x86_64
created #3889019
kvm
meson-ppc64el
created #3889018
kvm
meson-s390x