aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-07-06 14:53:06 -0600
committerJose Fonseca <[email protected]>2015-11-09 11:25:59 +0000
commit28f6faca518843b1ee30644a7bfb7aadd6551df1 (patch)
treedbba2c88a377653641e3a1204f78685768e23e11 /src/gallium/state_trackers
parent75d1e363ff142b273b30d8cd236bb1c92c1b2f27 (diff)
st/wgl: add null pointer check for HUD texture
Fixes crash when using HUD with Nobel Clinician Viewer. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/wgl/stw_framebuffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c b/src/gallium/state_trackers/wgl/stw_framebuffer.c
index fbe77b23d9c..11f60b6c763 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c
@@ -611,7 +611,9 @@ DrvSwapBuffers(HDC hdc)
/* Display the HUD */
struct pipe_resource *back =
stw_get_framebuffer_resource(fb->stfb, ST_ATTACHMENT_BACK_LEFT);
- hud_draw(ctx->hud, back);
+ if (back) {
+ hud_draw(ctx->hud, back);
+ }
}
if (ctx->current_framebuffer == fb) {