[mutter] egl: Allow passing NULL as error
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] egl: Allow passing NULL as error
- Date: Thu, 17 Nov 2016 16:08:42 +0000 (UTC)
commit 18b9cf8a85cd967d260c0dc4cdc52552be20eae7
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Oct 20 13:38:33 2016 +0800
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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c
index a1da5d2..5692012 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]