aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-12-11 15:32:11 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-12-11 15:32:11 -0800
commit04dacf5f4033d35e865ccb20c11ae4b7e1629c91 (patch)
tree5bb80e6820b63cf3bf6b8e75a1a5c0a8ce4e46e5 /src/core
parentb3466dc38e37a90122d0c39520ba24f972db0f2d (diff)
Fix windows
Diffstat (limited to 'src/core')
-rw-r--r--src/core/iomgr/tcp_server_windows.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/iomgr/tcp_server_windows.c b/src/core/iomgr/tcp_server_windows.c
index a2425cd4d2..583cab4890 100644
--- a/src/core/iomgr/tcp_server_windows.c
+++ b/src/core/iomgr/tcp_server_windows.c
@@ -486,8 +486,12 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s,
}
int grpc_tcp_listener_get_port(grpc_tcp_listener *listener) {
- grpc_tcp_listener *sp = listener;
- return sp->port;
+ if (listener != NULL) {
+ grpc_tcp_listener *sp = listener;
+ return sp->port;
+ } else {
+ return 0;
+ }
}
void grpc_tcp_listener_ref(grpc_tcp_listener *listener) {