From: Eric Anholt Date: Sat, 13 Mar 2010 01:12:14 +0000 (-0800) Subject: meta: Fix up restoration of state if _mesa_map_pbo_source() fails. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7cbb7051f42c0220b35ce1e834853dac8706a69a;p=mesa.git meta: Fix up restoration of state if _mesa_map_pbo_source() fails. --- diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index b29f58db729..84a2a5fcb3a 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -2067,8 +2067,10 @@ _mesa_meta_Bitmap(GLcontext *ctx, } bitmap1 = _mesa_map_pbo_source(ctx, &unpackSave, bitmap1); - if (!bitmap1) + if (!bitmap1) { + _mesa_meta_end(ctx); return; + } bitmap8 = (GLubyte *) calloc(1, width * height); if (bitmap8) {