Skip to content

Commit

Permalink
Fix leak
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Dec 17, 2024
1 parent b257a35 commit eb0c83d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Gestures/GesturePropertyTransition.vala
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,7 @@ public class Gala.GesturePropertyTransition : Object {
if (transition == null) {
finish (cancel_action);
} else {
transition.stopped.connect ((is_finished) => {
if (is_finished) {
finish (cancel_action);
}
});
transition.stopped.connect ((is_finished) => finish (cancel_action, is_finished));
}
};

Expand All @@ -153,8 +149,8 @@ public class Gala.GesturePropertyTransition : Object {
}
}

private void finish (bool cancel_action) {
if (done_callback != null) {
private void finish (bool cancel_action, bool callback = true) {
if (callback && done_callback != null) {
done_callback (cancel_action);
}

Expand Down

0 comments on commit eb0c83d

Please sign in to comment.