PNS: Prevent re-entry events when saving log to file

This commit is contained in:
Roberto Fernandez Bautista 2023-08-07 23:48:58 +02:00
parent 79a6b0d129
commit feb887fe8f
1 changed files with 3 additions and 1 deletions

View File

@ -576,7 +576,7 @@ void ROUTER_TOOL::saveRouterDebugLog()
{
auto logger = m_router->Logger();
if( ! logger )
if( !logger || logger->GetEvents().size() == 0 )
return;
wxString cwd = wxGetCwd();
@ -662,6 +662,8 @@ void ROUTER_TOOL::saveRouterDebugLog()
}
fclose( f );
logger->Clear(); // prevent re-entry
}