From 93bf28b87db57968ef436476344d5503a5dfac6d Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 19 Sep 2014 22:22:22 -0700 Subject: [PATCH] Fix weird double cancel crash. This might need more investigation later. --- .../src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/moonlight-common/src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java b/moonlight-common/src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java index 8b7d6b59..5c76e4f1 100644 --- a/moonlight-common/src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java +++ b/moonlight-common/src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java @@ -117,8 +117,10 @@ public class MdnsDiscoveryAgent { // Stop if requested if (stop) { // There will be no further timer invocations now - discoveryTimer.cancel(); - discoveryTimer = null; + if (discoveryTimer != null) { + discoveryTimer.cancel(); + discoveryTimer = null; + } return; }