diff --git a/common/pgm_base.cpp b/common/pgm_base.cpp index 1282dfc860..41c7b13992 100644 --- a/common/pgm_base.cpp +++ b/common/pgm_base.cpp @@ -159,6 +159,9 @@ PGM_BASE::~PGM_BASE() } delete[] m_argvUtf8; + + delete m_locale; + m_locale = nullptr; } @@ -170,10 +173,6 @@ void PGM_BASE::Destroy() sentry_close(); #endif - // unlike a normal destructor, this is designed to be called more than once safely: - delete m_locale; - m_locale = nullptr; - m_pgm_checker.reset(); }