mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
[cogl] Don't allow calling cogl_set_source_texture with an INVALID_HANDLE
Although the underlying materials should allow layers with INVALID_HANDLES it shouldn't be necissary to expose that via cogl_set_source_texture() and it's easier to resolve a warning/crash here than odd artefacts/crashes later in the pipeline.
This commit is contained in:
parent
96827db740
commit
71b62e75d2
@ -1512,6 +1512,8 @@ cogl_set_source_texture (CoglHandle texture_handle)
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
CoglColor white;
|
||||
|
||||
g_return_if_fail (texture_handle != COGL_INVALID_HANDLE);
|
||||
|
||||
cogl_material_set_layer (ctx->default_material, 0, texture_handle);
|
||||
cogl_color_set_from_4ub (&white, 0xff, 0xff, 0xff, 0xff);
|
||||
cogl_material_set_color (ctx->default_material, &white);
|
||||
|
Loading…
Reference in New Issue
Block a user