initialize m_hFont in the beginning of wxFontRefData::Init() to avoid freeing invalid font handle in SetXXX() called afterwards; removed hard TABs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
89574e1d55
commit
0572fce80a
@ -321,6 +321,8 @@ void wxFontRefData::Init(int pointSize,
|
|||||||
const wxString& faceName,
|
const wxString& faceName,
|
||||||
wxFontEncoding encoding)
|
wxFontEncoding encoding)
|
||||||
{
|
{
|
||||||
|
m_hFont = NULL;
|
||||||
|
|
||||||
m_sizeUsingPixels = sizeUsingPixels;
|
m_sizeUsingPixels = sizeUsingPixels;
|
||||||
if ( m_sizeUsingPixels )
|
if ( m_sizeUsingPixels )
|
||||||
SetPixelSize(pixelSize);
|
SetPixelSize(pixelSize);
|
||||||
@ -331,8 +333,6 @@ void wxFontRefData::Init(int pointSize,
|
|||||||
SetWeight(weight);
|
SetWeight(weight);
|
||||||
SetUnderlined(underlined);
|
SetUnderlined(underlined);
|
||||||
|
|
||||||
m_hFont = NULL;
|
|
||||||
|
|
||||||
// set the family/facename
|
// set the family/facename
|
||||||
SetFamily(family);
|
SetFamily(family);
|
||||||
if ( !faceName.empty() )
|
if ( !faceName.empty() )
|
||||||
|
Loading…
Reference in New Issue
Block a user