Nanotrace: Shutdown should do nothing if not initialized

Change-Id: I717296da4c9aea1e9dd28db3421a927f6bb8d332
Reviewed-by: Knud Dollereder <knud.dollereder@qt.io>
This commit is contained in:
Eike Ziller
2023-09-12 16:19:20 +02:00
parent 5d02b4df71
commit fcfe73d8f1

View File

@@ -168,6 +168,9 @@ void init(const std::string &process, const std::string &thread, const std::stri
void shutdown() void shutdown()
{ {
if (!initEvent.initialized)
return;
flush(); flush();
if (std::ofstream stream(initEvent.filePath, std::ios::app); stream.good()) if (std::ofstream stream(initEvent.filePath, std::ios::app); stream.good())