Index: /source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- /source/ariba/overlay/BaseOverlay.cpp	(revision 5889)
+++ /source/ariba/overlay/BaseOverlay.cpp	(revision 5893)
@@ -300,5 +300,9 @@
 /// send a message using a link descriptor, delivers it to the base overlay class
 seqnum_t BaseOverlay::send( OverlayMsg* message, LinkDescriptor* ld, bool ignore_down ) {
-	assert(ld!=NULL);
+	// check if null
+	if (ld == NULL) {
+		logging_error("Can not send message to " << message->getDestinationAddress());
+		return -1;
+	}
 
 	// check if up
@@ -313,4 +317,11 @@
 			<< ld->remoteNode);
 		ld = getRelayLinkTo( ld->remoteNode );
+		if (ld==NULL) {
+			LinkID lnk = overlayInterface->getNextLinkId(ld->remoteNode);
+			if (!lnk.isUnspecified())
+				ld = getDescriptor(lnk);
+			if (ld!=NULL && ld->relayed)
+				ld = NULL;
+		}
 		if (ld==NULL) {
 			logging_error("Direct link not found.");
