summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/dri/drisw.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2015-10-15 00:46:26 +0100
committerEmil Velikov <[email protected]>2015-11-21 12:52:20 +0000
commite43a771dfa5b99899a4a09cdd2989afc25eef17c (patch)
tree22b460c5d04d3c7a087deb6ac75184087c634edd /src/gallium/state_trackers/dri/drisw.c
parent13bccee87d6344ec7932b42de3fe3a2d10d30d96 (diff)
st/dri: NULL check the pscreen earlier
We delay the null check only to jump through hoops to work around that. Check early to make our lives easier. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/dri/drisw.c')
-rw-r--r--src/gallium/state_trackers/dri/drisw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c
index 06fa9427667..b85a73c57d2 100644
--- a/src/gallium/state_trackers/dri/drisw.c
+++ b/src/gallium/state_trackers/dri/drisw.c
@@ -400,7 +400,8 @@ drisw_init_screen(__DRIscreen * sPriv)
if (pipe_loader_sw_probe_dri(&screen->dev, &drisw_lf))
pscreen = pipe_loader_create_screen(screen->dev);
- /* dri_init_screen_helper checks pscreen for us */
+ if (!pscreen)
+ goto fail;
configs = dri_init_screen_helper(screen, pscreen, "swrast");
if (!configs)