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;
This commit is contained in:
Damien Lespiau 2011-05-16 16:04:33 +01:00
parent 051e6da887
commit d384466a58

View File

@ -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)