diff options
author | Dave Airlie <[email protected]> | 2015-06-10 13:51:59 +1000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-06-12 16:27:53 +0100 |
commit | 39aa6b8bea1383c7fe1ff04a3637248a3bbe4fc5 (patch) | |
tree | 1537a56359074be6454739df2019eb64a21b962b /src/gallium/state_trackers | |
parent | 1a47d37c994c51479d9c24a59b9d4944dd2db26c (diff) |
st/dri: check pscreen is valid before querying param
we don't check the validity of pscreen until dri_init_screen_helper
hit this trying to init glamor on a device with no driver (udl).
Acked-by: Michel Dänzer <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
(cherry picked from commit 563706c14641fde2ab604d590b5425680354f280)
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/dri/dri2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 792d5651698..8d93f786433 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -1483,7 +1483,7 @@ dri2_init_screen(__DRIscreen * sPriv) } } - if (pscreen->get_param(pscreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY)) { + if (pscreen && pscreen->get_param(pscreen, PIPE_CAP_DEVICE_RESET_STATUS_QUERY)) { sPriv->extensions = dri_robust_screen_extensions; screen->has_reset_status_query = true; } |