surfaceless: Fix swrast-path segfault when loader doesn't know driver name.
authorEric Anholt <eric@anholt.net>
Mon, 29 Jul 2019 23:25:56 +0000 (16:25 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 13 Aug 2019 17:30:01 +0000 (10:30 -0700)
commit86ae3c218662a302a96003010f331ac3d3153147
treeeb49c9026c66b2498a724be70de1b2bde0f0e95f
parent6a8d39dccdc1268e439a9ea0bc6fc89b3cd36815
surfaceless: Fix swrast-path segfault when loader doesn't know driver name.

If we're hitting the swrast fallback path here, it's probably because
we stumbled across a KMS-only device (such as the ASpeed that some of
our CI runners have) that will then return a NULL driver_name.  Don't
crash in that case.

Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/egl/drivers/dri2/platform_surfaceless.c