Fix weird double cancel crash. This might need more investigation later.

This commit is contained in:
Cameron Gutman 2014-09-19 22:22:22 -07:00
parent bd9c6834b7
commit 93bf28b87d

View File

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