transition: don't allow _return_error() to be called recursively
This commit is contained in:

committed by
Julian Bouzas

parent
6495eb6d21
commit
18377fbf82
@@ -488,10 +488,12 @@ wp_transition_return_error (WpTransition * self, GError * error)
|
|||||||
|
|
||||||
WpTransitionPrivate *priv = wp_transition_get_instance_private (self);
|
WpTransitionPrivate *priv = wp_transition_get_instance_private (self);
|
||||||
|
|
||||||
|
/* don't allow _return_error() to be called multiple times,
|
||||||
|
as it is dangerous to recurse in execute_step() */
|
||||||
if (G_UNLIKELY (priv->error)) {
|
if (G_UNLIKELY (priv->error)) {
|
||||||
wp_warning_object (self, "transition bailing out multiple times; "
|
wp_warning_object (self, "transition bailing out multiple times; "
|
||||||
"old error was: %s", priv->error->message);
|
"new error is: %s", error->message);
|
||||||
g_clear_error (&priv->error);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->step = WP_TRANSITION_STEP_ERROR;
|
priv->step = WP_TRANSITION_STEP_ERROR;
|
||||||
|
Reference in New Issue
Block a user