egl: Don't set an error when there is none
Some API will return NULL or the equivalent; sometimes it's an error, and sometimes it's not, and the way to check that is by looking at the return value of eglGetError(). When we check this, don't set the GError if it returned EGL_SUCCESS, as that indicates that the return value is expected behavior, and not an error. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2151>
This commit is contained in:
parent
48d0d7a210
commit
719a6c0006
@ -159,6 +159,9 @@ set_egl_error (GError **error)
|
||||
return;
|
||||
|
||||
error_number = eglGetError ();
|
||||
if (error_number == EGL_SUCCESS)
|
||||
return;
|
||||
|
||||
error_str = get_egl_error_str (error_number);
|
||||
g_set_error_literal (error, META_EGL_ERROR,
|
||||
error_number,
|
||||
|
Loading…
Reference in New Issue
Block a user