瀏覽代碼

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,