[Mesa-dev] [PATCH 01/13] mesa/meta: Don't free meta if it was never initialized

Brian Paul brianp at vmware.com
Mon Dec 1 07:41:53 PST 2014


On 11/28/2014 04:25 AM, Juha-Pekka Heikkila wrote:
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
>   src/mesa/drivers/common/meta.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index 87532c1..fab360d 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -403,6 +403,9 @@ _mesa_meta_init(struct gl_context *ctx)
>   void
>   _mesa_meta_free(struct gl_context *ctx)
>   {
> +   if (!ctx->Meta)
> +      return;
> +
>      GET_CURRENT_CONTEXT(old_context);
>      _mesa_make_current(ctx, NULL, NULL);
>      _mesa_meta_glsl_blit_cleanup(&ctx->Meta->Blit);

GET_CURRENT_CONTEXT declares a variable so this won't compile with MSVC.

-Brian




More information about the mesa-dev mailing list