From 18b9cf8a85cd967d260c0dc4cdc52552be20eae7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 20 Oct 2016 13:38:33 +0800 Subject: [PATCH] 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 --- src/backends/meta-egl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c index a1da5d2ad..569201213 100644 --- a/src/backends/meta-egl.c +++ b/src/backends/meta-egl.c @@ -127,6 +127,9 @@ set_egl_error (GError **error) { const char *error_str; + if (!error) + return; + error_str = get_egl_error_str (); g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,