diff --git a/src/Context.cpp b/src/Context.cpp index 654e71e9c..c97c19f2a 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -279,7 +279,8 @@ int Context::run () try { rc = dispatch (output); - hooks.onExit (); + if (hooks.onExit ()) + tdb2.commit (); std::stringstream s; s << "Perf "