From e0b19d4985846d64bb581013828a9dc5af401a5d Mon Sep 17 00:00:00 2001 From: joshualitt Date: Thu, 26 Mar 2015 10:41:02 -0700 Subject: [PATCH] small fix for nanobench segfault when not running any tests BUG=skia: Review URL: https://codereview.chromium.org/1030353004 --- bench/nanobench.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 920979c..5e05932 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -894,6 +894,12 @@ int nanobench_main() { log->config("meta"); log->metric("max_rss_mb", sk_tools::getMaxResidentSetSizeMB()); +#if SK_SUPPORT_GPU + // Make sure we clean up the global GrContextFactory here, otherwise we might race with the + // SkEventTracer destructor + gGrFactory.reset(NULL); +#endif + return 0; } -- 2.7.4