fix segfault: DLCX for unknown endpoint: dont try to log NULL endpoint

Change-Id: Ib127fd81a2d68f51c470ff77ef0822bdb4829de4
diff --git a/src/libosmo-mgcp/mgcp_protocol.c b/src/libosmo-mgcp/mgcp_protocol.c
index 8c6bd6e..9e04e50 100644
--- a/src/libosmo-mgcp/mgcp_protocol.c
+++ b/src/libosmo-mgcp/mgcp_protocol.c
@@ -853,13 +853,13 @@
 	struct mgcp_conn_rtp *conn = NULL;
 	uint32_t conn_id;
 
+	if (p->found != 0)
+		return create_err_response(NULL, error_code, "DLCX", p->trans);
+
 	LOGP(DLMGCP, LOGL_NOTICE,
 	     "DLCX: endpoint:%x deleting connection ...\n",
 	     ENDPOINT_NUMBER(endp));
 
-	if (p->found != 0)
-		return create_err_response(NULL, error_code, "DLCX", p->trans);
-
 	if (llist_count(&endp->conns) <= 0) {
 		LOGP(DLMGCP, LOGL_ERROR,
 		     "DLCX: endpoint:%x endpoint is not holding a connection.\n",