[cogl/wip/rib/master-next: 2/5] texture-pixmap-x11: set ->winsys = NULL if _create fails



commit a75cef0608b26abbebc167c94c8c8da1b534e9b0
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.

 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]