mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
cogl-shader: get_info_log should always use strdup
In the case where there is no error log for arbfp we were returning a "" string literal. The other paths were using g_strdup to return a string that could be freed with g_free. This makes the arbfp path return g_strdup ("") instead.
This commit is contained in:
parent
b50bdd7919
commit
01a7272599
@ -195,14 +195,16 @@ cogl_shader_get_info_log (CoglHandle handle)
|
||||
|
||||
shader = _cogl_shader_pointer_from_handle (handle);
|
||||
|
||||
#ifdef HAVE_COGL_GL
|
||||
if (shader->language == COGL_SHADER_LANGUAGE_ARBFP)
|
||||
{
|
||||
/* ARBfp exposes a program error string, but since cogl_program
|
||||
* doesn't have any API to query an error log it is not currently
|
||||
* exposed. */
|
||||
return "";
|
||||
return g_strdup ("");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
char buffer[512];
|
||||
int len = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user