mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-21 00:00:04 +01:00
transition: don't allow _return_error() to be called recursively
This commit is contained in:
parent
6495eb6d21
commit
18377fbf82
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue