summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/buffers.c4
-rw-r--r--src/mesa/main/context.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 8d77b3cb8a..2710d04454 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -604,6 +604,10 @@ void _mesa_resizebuffers( GLcontext *ctx )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glResizeBuffersMESA\n");
+ if (!ctx->Driver.GetBufferSize) {
+ return;
+ }
+
if (ctx->WinSysDrawBuffer) {
GLuint newWidth, newHeight;
GLframebuffer *buffer = ctx->WinSysDrawBuffer;
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index f6f9e90126..e0630c33d0 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1629,11 +1629,12 @@ static void
initialize_framebuffer_size(GLcontext *ctx, GLframebuffer *fb)
{
GLuint width, height;
- ASSERT(ctx->Driver.GetBufferSize);
- ctx->Driver.GetBufferSize(fb, &width, &height);
- if (ctx->Driver.ResizeBuffers)
- ctx->Driver.ResizeBuffers(ctx, fb, width, height);
- fb->Initialized = GL_TRUE;
+ if (ctx->Driver.GetBufferSize) {
+ ctx->Driver.GetBufferSize(fb, &width, &height);
+ if (ctx->Driver.ResizeBuffers)
+ ctx->Driver.ResizeBuffers(ctx, fb, width, height);
+ fb->Initialized = GL_TRUE;
+ }
}