From: Vadim Zeitlin Date: Thu, 19 Jun 2003 16:55:15 +0000 (+0000) Subject: fixed infinite recursion bug in some rare cases X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/523c2b8d4549f46d1f95c95a52ce8c3175f46fb4 fixed infinite recursion bug in some rare cases git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index e81d145d65..b546c19151 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -760,13 +760,15 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry, class ReentrancyBlocker { public: - ReentrancyBlocker(bool& b) : m_b(b) { m_b = TRUE; } - ~ReentrancyBlocker() { m_b = FALSE; } + ReentrancyBlocker(bool& flag) : m_flagOld(flag), m_flag(flag) + { m_flag = TRUE; } + ~ReentrancyBlocker() { m_flag = m_flagOld; } private: - bool& m_b; + bool m_flagOld; + bool& m_flag; }; -#endif +#endif // wxUSE_GUI bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, wxNativeEncodingInfo *info,