[cairo-commit] src/cairo-gl-composite.c

Benjamin Otte company at kemper.freedesktop.org
Mon May 17 11:58:10 PDT 2010


 src/cairo-gl-composite.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d68bbc0fe5706634e4c025bdcb311905b7f008e4
Author: Benjamin Otte <otte at gnome.org>
Date:   Mon May 17 20:57:08 2010 +0200

    gl: Add missing NULL-check in non-shader code

diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index c492d2c..c4c30de 100644
--- a/src/cairo-gl-composite.c
+++ b/src/cairo-gl-composite.c
@@ -849,8 +849,8 @@ _cairo_gl_set_component_alpha_mask_operand (cairo_gl_context_t *ctx,
 	     * alpha-only.  We may have a teximage with color bits if
 	     * the implementation doesn't support GL_ALPHA FBOs.
 	     */
-	    if (setup->mask.operand.texture.surface->base.content !=
-		CAIRO_CONTENT_ALPHA)
+	    if (setup->mask.operand.texture.surface == NULL ||
+                setup->mask.operand.texture.surface->base.content != CAIRO_CONTENT_ALPHA)
 		glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_RGB, GL_TEXTURE1);
 	    else
 		glTexEnvi (GL_TEXTURE_ENV, GL_SRC0_RGB, GL_CONSTANT);


More information about the cairo-commit mailing list