X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a371f70393c2af47d08c317ed496f751213c8fcb..222702b112dcc7bebe018d6f4d66fe469fefd02c:/src/x11/font.cpp?ds=inline diff --git a/src/x11/font.cpp b/src/x11/font.cpp index 4eaee81f00..5018bc39ed 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -79,10 +79,10 @@ wxXFont::wxXFont() wxXFont::~wxXFont() { - // TODO: why does freeing the font produce a segv??? - // Note that XFreeFont wasn't called in wxWin 1.68 either. - // XFontStruct* fontStruct = (XFontStruct*) m_fontStruct; - // XFreeFont((Display*) m_display, fontStruct); + // Freeing the font used to produce a segv, but + // appears to be OK now (bug fix in X11?) + XFontStruct* fontStruct = (XFontStruct*) m_fontStruct; + XFreeFont((Display*) m_display, fontStruct); } #endif @@ -123,7 +123,7 @@ public: void SetEncoding(wxFontEncoding encoding); void SetNoAntiAliasing( bool no = TRUE ) { m_noAA = no; } - bool GetNoAntiAliasing() { return m_noAA; } + bool GetNoAntiAliasing() const { return m_noAA; } // and this one also modifies all the other font data fields void SetNativeFontInfo(const wxNativeFontInfo& info); @@ -745,7 +745,7 @@ wxFontEncoding wxFont::GetEncoding() const return M_FONTDATA->m_encoding; } -bool wxFont::GetNoAntiAliasing() +bool wxFont::GetNoAntiAliasing() const { wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") );