mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-19 08:52:15 +01:00
fix NPE if CLI upload is used
This commit is contained in:
parent
52c829fb0d
commit
8363831dd4
@ -153,7 +153,9 @@ public class NetworkDiscovery implements Discovery, ServiceListener, Runnable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stop() {
|
public void stop() {
|
||||||
jmdns.unregisterAllServices();
|
if (jmdns != null) {
|
||||||
|
jmdns.unregisterAllServices();
|
||||||
|
}
|
||||||
// we don't close the JmmDNS instance as it's too slow
|
// we don't close the JmmDNS instance as it's too slow
|
||||||
/*
|
/*
|
||||||
try {
|
try {
|
||||||
@ -162,7 +164,9 @@ public class NetworkDiscovery implements Discovery, ServiceListener, Runnable {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
reachabilityTimer.cancel();
|
if (reachabilityTimer != null) {
|
||||||
|
reachabilityTimer.cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user