Commit 45b79c3e by Yusuke Suzuki

Check families is not nullptr before using it

When there's no benchmarks, families becomes nullptr. So before touching it, we need to ensure families is not nullptr.
parent 254a6f9a
......@@ -14,3 +14,4 @@ Dominic Hamon <dma@stripysock.com>
Eugene Zhuk <eugene.zhuk@gmail.com>
Google Inc.
Oleksandr Sochka <sasha.sochka@gmail.com>
Yusuke Suzuki <utatane.tea@gmail.com>
......@@ -28,3 +28,4 @@ Dominic Hamon <dma@stripysock.com>
Eugene Zhuk <eugene.zhuk@gmail.com>
Oleksandr Sochka <sasha.sochka@gmail.com>
Pierre Phaneuf <pphaneuf@google.com>
Yusuke Suzuki <utatane.tea@gmail.com>
......@@ -757,6 +757,7 @@ void Benchmark::FindBenchmarks(const std::string& spec,
}
mutex_lock l(&benchmark_mutex);
if (families == nullptr) return; // There's no families.
for (Benchmark* family : *families) {
if (family == nullptr) continue; // Family was deleted
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment