Log a fatal error when an error is propagated to a NULL error argument
Unlike in GError, the policy in Cogl for when NULL is passed as the CoglError argument is that the program should abort with a fatal error. Previously however any errors that were being propagated were being silently dropped if the application passed NULL. This patch fixes it to also log a fatal error in that case. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 41e233b4b27de579f77b82115cf43a618bf0c93f)
This commit is contained in:
parent
5faed43f29
commit
7b80ddcef9
1 changed files with 4 additions and 1 deletions
|
@ -105,7 +105,10 @@ _cogl_propagate_error (CoglError **dest,
|
|||
_COGL_RETURN_IF_FAIL (src != NULL);
|
||||
|
||||
if (dest == NULL)
|
||||
{
|
||||
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, "%s", src->message);
|
||||
cogl_error_free (src);
|
||||
}
|
||||
else if (*dest)
|
||||
g_warning (ERROR_OVERWRITTEN_WARNING, src->message);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue