Skip to content

Commit 5c4c4ab

Browse files
committed
prevent NPE when setting derived dialog
1 parent cc704ac commit 5c4c4ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/B2buaHelperImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ public SipServletResponse createResponseToOriginalRequest(
700700
//do this before creating response so proper toTag is selected
701701
SIPTransaction tx = (SIPTransaction) sipServletRequestImpl.getTransaction();
702702
SIPDialog newDialog = (SIPDialog)sipSession.getSessionCreatingDialog();
703-
if (newDialog != null) {
703+
if (newDialog != null && tx != null) {
704704
logger.debug("recovering dialog on transaction before send:" + System.identityHashCode(newDialog));
705705
tx.setDialog(newDialog, newDialog.getDialogId());
706706
}

0 commit comments

Comments
 (0)