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>
This commit is contained in:
Robert Bragg 2011-07-15 19:58:22 +01:00
parent c058b50ac0
commit 02ba1a7345

View File

@ -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);
}