Browse Source

core: fixed segmentation fault I had added to forward.h

Peter Dunkley 13 năm trước cách đây
mục cha
commit
11a2ad18ea
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      forward.h

+ 1 - 1
forward.h

@@ -145,7 +145,7 @@ static inline int msg_send(struct dest_info* dst, char* buf, int len)
 		else if (dst->proto == PROTO_TLS)
 			con = tcpconn_get(dst->id, 0, 0, 0, 0);
 #endif
-		if (con->flags & F_CONN_WS)
+		if (con && con->flags & F_CONN_WS)
 		{
 			memset(&wsev, 0, sizeof(ws_event_info_t));
 			wsev.type = SREV_TCP_WS_FRAME_OUT;