[Cogl] [PATCH 5/8] test-gles2-context: Fix error checking for cogl_gles2_context_new

Robert Bragg robert at sixbynine.org
Thu Aug 9 10:50:07 PDT 2012


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
- Robert

On Thu, Aug 9, 2012 at 5:08 PM, Neil Roberts <neil at linux.intel.com> wrote:
> The test was passing NULL as the error argument but then trying to use
> the error object if it failed so it would just crash in that case.
> ---
>  tests/conform/test-gles2-context.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/conform/test-gles2-context.c b/tests/conform/test-gles2-context.c
> index ff0db16..fdb796f 100644
> --- a/tests/conform/test-gles2-context.c
> +++ b/tests/conform/test-gles2-context.c
> @@ -159,7 +159,7 @@ create_gles2_context (CoglTexture **offscreen_texture,
>    *pipeline = cogl_pipeline_new (test_ctx);
>    cogl_pipeline_set_layer_texture (*pipeline, 0, *offscreen_texture);
>
> -  *gles2_ctx = cogl_gles2_context_new (test_ctx, NULL);
> +  *gles2_ctx = cogl_gles2_context_new (test_ctx, &error);
>    if (!*gles2_ctx)
>      g_error ("Failed to create GLES2 context: %s\n", error->message);
>
> --
> 1.7.11.3.g3c3efa5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list