projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7bfc317
)
st/dri: avoid segfault if we can't get a pixmap's buffers
author
Ben Skeggs
<bskeggs@redhat.com>
Mon, 5 Oct 2009 05:51:47 +0000
(15:51 +1000)
committer
Ben Skeggs
<bskeggs@redhat.com>
Mon, 5 Oct 2009 05:52:33 +0000
(15:52 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
src/gallium/state_trackers/dri/dri_drawable.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/dri/dri_drawable.c
b/src/gallium/state_trackers/dri/dri_drawable.c
index 6aafb384ef53b3beb98bab4309d51164285b8896..3f8dc8df75ecb652641e26b06551feba765411dd 100644
(file)
--- a/
src/gallium/state_trackers/dri/dri_drawable.c
+++ b/
src/gallium/state_trackers/dri/dri_drawable.c
@@
-249,6
+249,9
@@
void dri2_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target,
dri_get_buffers(drawable->dPriv);
st_get_framebuffer_surface(drawable->stfb, ST_SURFACE_FRONT_LEFT, &ps);
+ if (!ps)
+ return;
+
st_bind_texture_surface(ps, target == GL_TEXTURE_2D ? ST_TEXTURE_2D :
ST_TEXTURE_RECT, 0, drawable->color_format);
}