aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/closure.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/iomgr/closure.c')
-rw-r--r--src/core/lib/iomgr/closure.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c
index 2c84e82aca..c6ddc76732 100644
--- a/src/core/lib/iomgr/closure.c
+++ b/src/core/lib/iomgr/closure.c
@@ -116,7 +116,9 @@ grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg) {
void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c,
grpc_error *error) {
GPR_TIMER_BEGIN("grpc_closure_run", 0);
- c->cb(exec_ctx, c->cb_arg, error);
+ if (c != NULL) {
+ c->cb(exec_ctx, c->cb_arg, error);
+ }
GRPC_ERROR_UNREF(error);
GPR_TIMER_END("grpc_closure_run", 0);
}