mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
All tryToClose() methods should check for null arguments.
This commit is contained in:
@@ -114,7 +114,7 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
|
||||
|
||||
private void tryToClose(SerialPort port) {
|
||||
try {
|
||||
port.closePort();
|
||||
if(port != null) port.closePort();
|
||||
} catch(IOException e) {
|
||||
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user