summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-17 10:50:06 +0100
committerBrian <brian.paul@tungstengraphics.com>2007-08-17 10:50:06 +0100
commit89cda7bdc85b10526987321214965f21b148735f (patch)
tree450480e72a658c3f3ec439728c761c9b00892368 /src/mesa/drivers/x11
parent5b59e6116db5241dc9a08b98e5eb8f0c770c05ea (diff)
replace assertion w/ conditionals in xmesa_clear()
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/xm_surface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/x11/xm_surface.c b/src/mesa/drivers/x11/xm_surface.c
index a751b0868c..d40d9eda84 100644
--- a/src/mesa/drivers/x11/xm_surface.c
+++ b/src/mesa/drivers/x11/xm_surface.c
@@ -293,13 +293,13 @@ void
xmesa_clear(struct pipe_context *pipe, struct pipe_surface *ps, GLuint value)
{
struct xmesa_renderbuffer *xrb = xmesa_rb((struct softpipe_surface *) ps);
- assert(xrb);
- if (xrb->ximage) {
+
+ if (xrb && xrb->ximage) {
/* clearing back color buffer */
GET_CURRENT_CONTEXT(ctx);
xmesa_clear_buffers(ctx, BUFFER_BIT_BACK_LEFT);
}
- else if (xrb->pixmap) {
+ else if (xrb && xrb->pixmap) {
/* clearing front color buffer */
GET_CURRENT_CONTEXT(ctx);
xmesa_clear_buffers(ctx, BUFFER_BIT_FRONT_LEFT);