diff options
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 1e8ec0556ef..2a60ed4df8a 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -124,6 +124,11 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, pipe_surface_reference( &strb->surface, NULL ); pipe_resource_reference( &strb->texture, NULL ); + if (width == 0 || height == 0) { + /* if size is zero, nothing to allocate */ + return GL_TRUE; + } + /* Setup new texture template. */ memset(&template, 0, sizeof(template)); |