소스 검색

Fix static code analysis errors reported by new coverity scan tool

bel2125 5 년 전
부모
커밋
d6a604b5cb
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/civetweb.c

+ 2 - 2
src/civetweb.c

@@ -17085,8 +17085,8 @@ mg_connect_client2(const char *host,
 		return mg_connect_websocket_client(host,
 		                                   port,
 		                                   is_ssl,
-		                                   error->text,
-		                                   error->text_buffer_size,
+		                                   ((error != NULL) ? error->text : NULL),
+		                                   ((error != NULL) ? error->text_buffer_size : 0),
 		                                   (path ? path : ""),
 		                                   NULL /* TODO: origin */,
 		                                   deprecated_websocket_data_wrapper,