[cogl] Initialize boolean flag in CoglContext

The private CoglContext is created using g_malloc() and not
zeroed; this means we have to initialize the values we are
going to check, to avoid hitting garbage.

Thanks to Tommi Komulainen.
This commit is contained in:
Emmanuele Bassi 2009-03-10 17:53:51 +00:00
parent c50bd8b24e
commit 949e37d332
2 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,8 @@ cogl_create_context ()
_context->enable_flags = 0; _context->enable_flags = 0;
_context->enable_backface_culling = FALSE;
_context->material_handles = NULL; _context->material_handles = NULL;
_context->material_layer_handles = NULL; _context->material_layer_handles = NULL;
_context->default_material = cogl_material_new (); _context->default_material = cogl_material_new ();

View File

@ -58,6 +58,8 @@ cogl_create_context ()
_context->enable_flags = 0; _context->enable_flags = 0;
_context->enable_backface_culling = FALSE;
_context->material_handles = NULL; _context->material_handles = NULL;
_context->material_layer_handles = NULL; _context->material_layer_handles = NULL;
_context->default_material = cogl_material_new (); _context->default_material = cogl_material_new ();