Skip to content
Snippets Groups Projects
Commit c2dd2a2b authored by Craig Tiller's avatar Craig Tiller
Browse files

Fix potential crash

parent ef91e569
No related branches found
No related tags found
No related merge requests found
...@@ -116,7 +116,9 @@ grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg) { ...@@ -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, void grpc_closure_run(grpc_exec_ctx *exec_ctx, grpc_closure *c,
grpc_error *error) { grpc_error *error) {
GPR_TIMER_BEGIN("grpc_closure_run", 0); 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); GRPC_ERROR_UNREF(error);
GPR_TIMER_END("grpc_closure_run", 0); GPR_TIMER_END("grpc_closure_run", 0);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment