mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-25 21:40:11 +00:00
Fix crash in virtual controller if a release event happens without a press
This commit is contained in:
1 parent
93b0073467
commit
9417908848
1 file changed
+8
-2
@@ -190,8 +190,14 @@ public class DigitalButton extends VirtualControllerElement {
|
|||||||
for (DigitalButtonListener listener : listeners) {
|
for (DigitalButtonListener listener : listeners) {
|
||||||
listener.onRelease();
|
listener.onRelease();
|
||||||
}
|
}
|
||||||
timerLongClick.cancel();
|
|
||||||
longClickTimerTask.cancel();
|
// We may be called for a release without a prior click
|
||||||
|
if (timerLongClick != null) {
|
||||||
|
timerLongClick.cancel();
|
||||||
|
}
|
||||||
|
if (longClickTimerTask != null) {
|
||||||
|
longClickTimerTask.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in new issue
Block a user