MINOR: log: make the backend fall back to the frontend when there's no stream

This is already what happens before the backend is assigned, except that
now we don't need to dereference a NULL stream to figure this.
diff --git a/src/log.c b/src/log.c
index 4e7818d..2613940 100644
--- a/src/log.c
+++ b/src/log.c
@@ -1571,7 +1571,7 @@
 int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t maxsize, struct list *list_format)
 {
 	struct proxy *fe = sess->fe;
-	struct proxy *be = s->be;
+	struct proxy *be = s ? s->be : fe;
 	struct http_txn *txn = s->txn;
 	struct buffer chunk;
 	char *uri;
@@ -1995,7 +1995,7 @@
 				break;
 
 			case LOG_FMT_TD: // %Td
-				if (s->be->mode == PR_MODE_HTTP)
+				if (be->mode == PR_MODE_HTTP)
 					ret = ltoa_o((s->logs.t_data >= 0) ? s->logs.t_close - s->logs.t_data : -1,
 					             tmplog, dst + maxsize - tmplog);
 				else