mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
pipe-loader: check that the pointer to driconf_xml isn't NULL
This happens when mesa is built with only swrast. The default driver being kmsro and the default driconf file being v3d, it's NULL and then strdup crashes. This fixes a crash with piglit spec/egl_mesa_query_driver/conformance. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
parent
046097c092
commit
8fc8e8e8be
1 changed files with 1 additions and 1 deletions
|
|
@ -331,7 +331,7 @@ pipe_loader_drm_get_driinfo_xml(const char *driver_name)
|
|||
const struct drm_driver_descriptor *dd =
|
||||
get_driver_descriptor(driver_name, &lib);
|
||||
|
||||
if (dd && dd->driconf_xml)
|
||||
if (dd && dd->driconf_xml && *dd->driconf_xml)
|
||||
xml = strdup(*dd->driconf_xml);
|
||||
|
||||
if (lib)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue