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 <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2015-06-10 13:51:59 +10:00
parent c6877c9e59
commit 563706c146

View file

@ -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;
}