From 01c0c01a6d737d71a75cbd0de65c87c42b7ca230 Mon Sep 17 00:00:00 2001
From: Alan Hourihane <alanh@vmware.com>
Date: Fri, 20 Feb 2009 14:40:08 +0000
Subject: mesa: only call update_buffer when it's available

---
 src/mesa/state_tracker/st_cb_viewport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/mesa/state_tracker/st_cb_viewport.c b/src/mesa/state_tracker/st_cb_viewport.c
index 6adf3162c1..7b175288fc 100644
--- a/src/mesa/state_tracker/st_cb_viewport.c
+++ b/src/mesa/state_tracker/st_cb_viewport.c
@@ -40,7 +40,7 @@ static void st_viewport(GLcontext * ctx, GLint x, GLint y,
 {
    struct st_context *st = ctx->st;
 
-   if (st->pipe->winsys)
+   if (st->pipe->winsys && st->pipe->winsys->update_buffer)
       st->pipe->winsys->update_buffer( st->pipe->winsys,
                                        st->pipe->priv );
 }
-- 
cgit v1.2.3