mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
Fix unitialized first_pixels for foreign textures
tex->first_pixels was never set for foreign textures, leading to a crash when the texture object is freed. As a quick fix, simply set to NULL. A more complete fix would require remembering if we had ever seen the first pixel uploaded, and if not, doing a glReadPixel to get it before triggering the mipmap update. http://bugzilla.openedhand.com/show_bug.cgi?id=1645 Signed-off-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
08d580f68a
commit
1d7a7bf1e6
@ -1600,6 +1600,8 @@ cogl_texture_new_from_foreign (GLuint gl_handle,
|
||||
|
||||
g_array_append_val (tex->slice_gl_handles, gl_handle);
|
||||
|
||||
tex->first_pixels = NULL;
|
||||
|
||||
return _cogl_texture_handle_new (tex);
|
||||
}
|
||||
|
||||
|
@ -1676,6 +1676,8 @@ cogl_texture_new_from_foreign (GLuint gl_handle,
|
||||
|
||||
g_array_append_val (tex->slice_gl_handles, gl_handle);
|
||||
|
||||
tex->first_pixels = NULL;
|
||||
|
||||
return _cogl_texture_handle_new (tex);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user