From 3c5a868a1bbd0bf08d3c6a4213f7807f3cfdb893 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas <dgq@google.com> Date: Wed, 30 Nov 2016 11:26:58 -0800 Subject: [PATCH] PR comments #2 --- test/cpp/qps/json_run_localhost.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/cpp/qps/json_run_localhost.cc b/test/cpp/qps/json_run_localhost.cc index 409abed12e..b7b2553f12 100644 --- a/test/cpp/qps/json_run_localhost.cc +++ b/test/cpp/qps/json_run_localhost.cc @@ -61,7 +61,7 @@ std::string as_string(const T& val) { static void sighandler(int sig) { const int errno_saved = errno; - g_driver->Interrupt(); + if (g_driver != NULL) g_driver->Interrupt(); for (int i = 0; i < kNumWorkers; ++i) { if (g_workers[i]) g_workers[i]->Interrupt(); } @@ -133,6 +133,7 @@ int main(int argc, char** argv) { } delete g_driver; + g_driver = NULL; for (int i = 0; i < kNumWorkers; ++i) delete g_workers[i]; GPR_ASSERT(driver_join_status == 0); } -- GitLab