[cogl/wip/android: 8/13] winsys-egl: Check if there is a GError set before clearing it
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/android: 8/13] winsys-egl: Check if there is a GError set before clearing it
- Date: Mon, 16 May 2011 17:40:21 +0000 (UTC)
commit 314eca5528842aeeff47e63844c3ae838b5c8cdb
Author: Damien Lespiau <damien lespiau intel com>
Date: Mon May 16 16:04:33 2011 +0100
winsys-egl: Check if there is a GError set before clearing it
When try_create_context() returns saying that it can be run again to
test create a context with an alternate configuration, it might not have
a GError set (and it fact it does not right now). Thus right if
try_create_context() has the set error before freeing it (you have an
assertion from glib if error is NULL).
cogl/winsys/cogl-winsys-egl.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-egl.c b/cogl/winsys/cogl-winsys-egl.c
index 133e127..7cd32d7 100644
--- a/cogl/winsys/cogl-winsys-egl.c
+++ b/cogl/winsys/cogl-winsys-egl.c
@@ -882,9 +882,12 @@ create_context (CoglDisplay *display, GError **error)
&try_error)) &&
try_fallback)
{
- g_error_free (try_error);
+ if (try_error)
+ {
+ g_error_free (try_error);
+ try_error = NULL;
+ }
cleanup_context (display);
- try_error = NULL;
retry_cookie++;
}
if (!status)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]