egl: Allow passing NULL as error

When calling an EGL function is expected to sometimes fail, we might
not care about the error.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
This commit is contained in:
Jonas Ådahl 2016-10-20 13:38:33 +08:00
parent 934184e236
commit 18b9cf8a85

View File

@ -127,6 +127,9 @@ set_egl_error (GError **error)
{ {
const char *error_str; const char *error_str;
if (!error)
return;
error_str = get_egl_error_str (); error_str = get_egl_error_str ();
g_set_error (error, G_IO_ERROR, g_set_error (error, G_IO_ERROR,
G_IO_ERROR_FAILED, G_IO_ERROR_FAILED,