diff --git a/common/app_monitor.cpp b/common/app_monitor.cpp index 2872873c72..733e198903 100644 --- a/common/app_monitor.cpp +++ b/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 ) {