mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 12:41:05 +00:00
glshader: prevent from getting attributes without vertex shader
It doesn't make sense to query for vertex attributes without a vertex shader. Moreover this is causing a crash on OSX. https://bugzilla.gnome.org/show_bug.cgi?id=746168
This commit is contained in:
parent
bf0440f97b
commit
7d83351172
1 changed files with 3 additions and 0 deletions
|
@ -1170,6 +1170,9 @@ gst_gl_shader_get_attribute_location (GstGLShader * shader, const gchar * name)
|
||||||
g_return_val_if_fail (shader != NULL, 0);
|
g_return_val_if_fail (shader != NULL, 0);
|
||||||
priv = shader->priv;
|
priv = shader->priv;
|
||||||
g_return_val_if_fail (priv->program_handle != 0, 0);
|
g_return_val_if_fail (priv->program_handle != 0, 0);
|
||||||
|
if (0 == priv->vertex_handle)
|
||||||
|
return -1;
|
||||||
|
|
||||||
gl = shader->context->gl_vtable;
|
gl = shader->context->gl_vtable;
|
||||||
|
|
||||||
return gl->GetAttribLocation (priv->program_handle, name);
|
return gl->GetAttribLocation (priv->program_handle, name);
|
||||||
|
|
Loading…
Reference in a new issue