From c058b50ac070d4e5a0933db4ea2e4d1541c745f0 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Fri, 15 Jul 2011 19:35:55 +0100 Subject: [PATCH] texture-pixmap-x11: initialize ->use_winsys_texture This ensures that tex_pixmap->use_winsys_texture is always initialized during cogl_texture_pixmap_x11_new - either according to the result of winsys->texture_pixmap_x11_create, or if the winsys doesn't support tfp we explicitly initialize to FALSE. Reviewed-by: Neil Roberts --- cogl/winsys/cogl-texture-pixmap-x11.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c index 134d193cf..3b5de24d3 100644 --- a/cogl/winsys/cogl-texture-pixmap-x11.c +++ b/cogl/winsys/cogl-texture-pixmap-x11.c @@ -329,7 +329,12 @@ cogl_texture_pixmap_x11_new (guint32 pixmap, winsys = _cogl_texture_pixmap_x11_get_winsys (tex_pixmap); if (winsys->texture_pixmap_x11_create) - winsys->texture_pixmap_x11_create (tex_pixmap); + { + tex_pixmap->use_winsys_texture = + winsys->texture_pixmap_x11_create (tex_pixmap); + } + else + tex_pixmap->use_winsys_texture = FALSE; return _cogl_texture_pixmap_x11_handle_new (tex_pixmap); }