mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 05:28:05 +02:00
st/gbm: retrieve the driver-name via dd_driver_name()
... on static targets. Otherwise we'll crash badly as gdrm->dev is NULL when we try to copy the string driver_name. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
85109bc507
commit
d93ae21939
1 changed files with 6 additions and 0 deletions
|
|
@ -282,7 +282,13 @@ gbm_gallium_drm_device_create(int fd)
|
|||
if (gdrm->screen == NULL)
|
||||
goto out_no_screen;
|
||||
|
||||
#if GALLIUM_STATIC_TARGETS
|
||||
gdrm->base.driver_name = strdup(dd_driver_name());
|
||||
#else
|
||||
#ifdef HAVE_PIPE_LOADER_DRM
|
||||
gdrm->base.driver_name = strdup(gdrm->dev->driver_name);
|
||||
#endif /* HAVE_PIPE_LOADER_DRM */
|
||||
#endif
|
||||
return &gdrm->base.base;
|
||||
|
||||
out_no_screen:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue