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; }