diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-02-18 16:19:34 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-02-18 17:21:18 +0000 |
commit | 6727fa583164e630aeb10f39ad1f5e9f69f9b6ae (patch) | |
tree | 51f81af389c0077b4b1d7f21a80928e85c2e5242 /jurt | |
parent | bc9ff64c40a3e39b705f9fb141a63fc5c014b930 (diff) |
coverity#1326462 Dereference null return value
Change-Id: I80358cffe74f64fa710d9381b9615b64f903db3e
Diffstat (limited to 'jurt')
-rw-r--r-- | jurt/com/sun/star/lib/connections/socket/socketAcceptor.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java b/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java index da33625e498d..f9b375a78c76 100644 --- a/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java +++ b/jurt/com/sun/star/lib/connections/socket/socketAcceptor.java @@ -155,8 +155,11 @@ public final class socketAcceptor implements XAcceptor { if (tcpNoDelay != null) { socket.setTcpNoDelay(tcpNoDelay.booleanValue()); } - else if (((InetSocketAddress)socket.getRemoteSocketAddress()).getAddress().isLoopbackAddress()) { - socket.setTcpNoDelay(true); + else { + InetSocketAddress address = (InetSocketAddress)socket.getRemoteSocketAddress(); + if (address != null && address.getAddress().isLoopbackAddress()) { + socket.setTcpNoDelay(true); + } } return new SocketConnection(acceptingDescription, socket); } |