diff --git a/docs/changes.txt b/docs/changes.txt index 8a2433a8e5..dd3af5a823 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -175,14 +175,15 @@ OTHER CHANGES 2.4.2 ----- -wxBase: - -- always NUL-terminate the log messages - All: +- always NUL-terminate the log messages - wxRegEx::Compile() now calculates the number of groups correctly +All (GUI): + +- rare crash in wxFontMapper fixed (Robert Vazan) + Generic: - wxListCtrl: respect wxLC_NO_HEADER style when inserting first column diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index 5e75f2f751..15acfee7f2 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -758,13 +758,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,