[cogl] winsys-egl: Use g_clear_error() between two context creation tries
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] winsys-egl: Use g_clear_error() between two context creation tries
- Date: Tue, 17 May 2011 14:31:16 +0000 (UTC)
commit d384466a580108b6163de5beb77dfc3c143fa2d4
Author: Damien Lespiau <damien lespiau intel com>
Date: Mon May 16 16:04:33 2011 +0100
winsys-egl: Use g_clear_error() between two context creation tries
When try_create_context() returns saying that it has to be run again to
try to create a context with an alternate configuration, it might not
have a GError set (and in fact it does not right now).
g_clear_error() handles that case where error is still NULL;
cogl/winsys/cogl-winsys-egl.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index 133e127..268a13a 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -882,9 +882,8 @@ create_context (CoglDisplay *display, GError **error)
&try_error)) &&
try_fallback)
{
- g_error_free (try_error);
+ g_clear_error (error);
cleanup_context (display);
- try_error = NULL;
retry_cookie++;
}
if (!status)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]