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:
Robert Bragg 2010-08-12 10:43:22 +01:00
parent a0247f294d
commit 63fd426b4b

View File

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