diff options
author | Dave Airlie <[email protected]> | 2015-06-10 13:51:59 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-06-10 14:10:33 +1000 |
commit | 563706c14641fde2ab604d590b5425680354f280 (patch) | |
tree | bca3403366a614c0b9323f499b65194e319b7e23 /src/gallium/state_trackers/dri | |
parent | c6877c9e5983287a0741b26a358b7d744aebe232 (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]>
Diffstat (limited to 'src/gallium/state_trackers/dri')
-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; } |