[cogl] texture-pixmap-x11: set ->winsys = NULL if _create fails



commit 02ba1a7345c9e5d2b03e5f979d6a23d246f40371
Author: Robert Bragg <robert linux intel com>
Date:   Fri Jul 15 19:58:22 2011 +0100

    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 <neil linux intel com>

 cogl/winsys/cogl-texture-pixmap-x11.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c
index 3b5de24..767262e 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);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]