From 02ba1a7345c9e5d2b03e5f979d6a23d246f40371 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Fri, 15 Jul 2011 19:58:22 +0100 Subject: [PATCH] texture-pixmap-x11: set ->winsys = NULL if _create fails If _cogl_winsys_texture_pixmap_x11_create() fails then implicitly no private state has been associated with the given tex_pixmap. Since that winsys isn't associated with it we explicitly set tex_pixmap->winsys = NULL. Reviewed-by: Neil Roberts --- cogl/winsys/cogl-texture-pixmap-x11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c index 3b5de24d3..767262e00 100644 --- a/cogl/winsys/cogl-texture-pixmap-x11.c +++ b/cogl/winsys/cogl-texture-pixmap-x11.c @@ -336,6 +336,9 @@ cogl_texture_pixmap_x11_new (guint32 pixmap, else tex_pixmap->use_winsys_texture = FALSE; + if (!tex_pixmap->use_winsys_texture) + tex_pixmap->winsys = NULL; + return _cogl_texture_pixmap_x11_handle_new (tex_pixmap); }