diff --git a/src/libs/nanotrace/nanotrace.cpp b/src/libs/nanotrace/nanotrace.cpp index 658d84a43f1..c5adeb4d724 100644 --- a/src/libs/nanotrace/nanotrace.cpp +++ b/src/libs/nanotrace/nanotrace.cpp @@ -168,6 +168,9 @@ void init(const std::string &process, const std::string &thread, const std::stri void shutdown() { + if (!initEvent.initialized) + return; + flush(); if (std::ofstream stream(initEvent.filePath, std::ios::app); stream.good())