summaryrefslogtreecommitdiffstats
path: root/src/glx/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/x11')
-rw-r--r--src/glx/x11/dri2_glx.c3
-rw-r--r--src/glx/x11/indirect_vertex_program.c8
2 files changed, 10 insertions, 1 deletions
diff --git a/src/glx/x11/dri2_glx.c b/src/glx/x11/dri2_glx.c
index c56adfa5587..3c366bfa1e4 100644
--- a/src/glx/x11/dri2_glx.c
+++ b/src/glx/x11/dri2_glx.c
@@ -211,6 +211,9 @@ dri2GetBuffers(__DRIdrawable *driDrawable,
buffers = DRI2GetBuffers(pdraw->base.psc->dpy, pdraw->base.xDrawable,
width, height, attachments, count, out_count);
+ if (buffers == NULL)
+ return NULL;
+
pdraw->width = *width;
pdraw->height = *height;
diff --git a/src/glx/x11/indirect_vertex_program.c b/src/glx/x11/indirect_vertex_program.c
index 8d7cec9dd21..4f1485a850c 100644
--- a/src/glx/x11/indirect_vertex_program.c
+++ b/src/glx/x11/indirect_vertex_program.c
@@ -193,7 +193,13 @@ void __indirect_glGetVertexAttribivARB( GLuint index, GLenum pname,
get_vertex_attrib( gc, 1303, index, pname, (xReply *) & reply );
if ( reply.size != 0 ) {
- if ( ! get_attrib_array_data( state, index, pname, params ) ) {
+ GLintptr data;
+
+
+ if ( get_attrib_array_data( state, index, pname, & data ) ) {
+ *params = (GLint) data;
+ }
+ else {
if (reply.size == 1) {
*params = (GLint) reply.pad3;
}