Skip to content

Commit eb0c83d

Browse files
committed
Fix leak
1 parent b257a35 commit eb0c83d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Gestures/GesturePropertyTransition.vala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,7 @@ public class Gala.GesturePropertyTransition : Object {
122122
if (transition == null) {
123123
finish (cancel_action);
124124
} else {
125-
transition.stopped.connect ((is_finished) => {
126-
if (is_finished) {
127-
finish (cancel_action);
128-
}
129-
});
125+
transition.stopped.connect ((is_finished) => finish (cancel_action, is_finished));
130126
}
131127
};
132128

@@ -153,8 +149,8 @@ public class Gala.GesturePropertyTransition : Object {
153149
}
154150
}
155151

156-
private void finish (bool cancel_action) {
157-
if (done_callback != null) {
152+
private void finish (bool cancel_action, bool callback = true) {
153+
if (callback && done_callback != null) {
158154
done_callback (cancel_action);
159155
}
160156

0 commit comments

Comments
 (0)