Browse Source

Prevent file read error on non-existent uid

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/21760
master
Mark Roszko 3 weeks ago
parent
commit
41790e0831
  1. 9
      common/app_monitor.cpp

9
common/app_monitor.cpp

@ -131,9 +131,12 @@ const wxString& SENTRY::GetSentryId()
void SENTRY::readOrCreateUid()
{
wxFFile sentryInitFile( m_sentry_uid_fn.GetFullPath() );
sentryInitFile.ReadAll( &m_sentryUid );
sentryInitFile.Close();
if( m_sentry_optin_fn.Exists() )
{
wxFFile sentryInitFile( m_sentry_uid_fn.GetFullPath() );
sentryInitFile.ReadAll( &m_sentryUid );
sentryInitFile.Close();
}
if( m_sentryUid.IsEmpty() || m_sentryUid.length() != 36 )
{

Loading…
Cancel
Save