Skip to content

Commit

Permalink
comm/transports/ImcUdpTransport: Fix null pointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulosousadias committed Jul 14, 2024
1 parent f35f5af commit d62ae4c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/java/pt/lsts/neptus/comm/transports/ImcUdpTransport.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ public void deliveryResult(ResultEnum result, Exception error) {
};
}
DeliveryResult retResult = getUdpTransport().sendMessage(IdPair.from(destination, port), baos.toByteArray()).get();
listener.deliveryResult(retResult.result, retResult.exception);
if (listener != null) {
listener.deliveryResult(retResult.result, retResult.exception);
}
boolean ret = false;
switch (retResult.result) {
case Success:
Expand Down

0 comments on commit d62ae4c

Please sign in to comment.