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
This commit is contained in:
Vadim Zeitlin 2003-06-19 16:55:15 +00:00
parent 9f522551db
commit 523c2b8d45

View File

@ -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,