28 lines
805 B
Diff
28 lines
805 B
Diff
--- src/mesa/drivers/x11/xm_api.c.orig 2006-11-30 20:45:42.000000000 +0100
|
|
+++ src/mesa/drivers/x11/xm_api.c 2006-11-30 20:47:12.000000000 +0100
|
|
@@ -2101,7 +2101,11 @@ static void FXgetImage( XMesaBuffer b )
|
|
static unsigned short pixbuf[MAX_WIDTH];
|
|
GLuint x, y;
|
|
GLuint width, height;
|
|
- XMesaContext xmesa = XMESA_CONTEXT(ctx);
|
|
+ XMesaContext xmesa;
|
|
+
|
|
+ if (! ctx)
|
|
+ return;
|
|
+ xmesa = XMESA_CONTEXT(ctx);
|
|
|
|
#ifdef XFree86Server
|
|
x = b->frontxrb->pixmap->x;
|
|
@@ -2535,7 +2539,9 @@ void
|
|
XMesaResizeBuffers( XMesaBuffer b )
|
|
{
|
|
GET_CURRENT_CONTEXT(ctx);
|
|
- XMesaContext xmctx = XMESA_CONTEXT(ctx);
|
|
- xmesa_check_and_update_buffer_size(xmctx, b);
|
|
+ if (ctx) {
|
|
+ XMesaContext xmctx = XMESA_CONTEXT(ctx);
|
|
+ xmesa_check_and_update_buffer_size(xmctx, b);
|
|
+ }
|
|
}
|
|
|