check for NULL pointer returned by wxFontEnumerator::GetFacenames() (it actually happens under Cocoa and could conceivably happen elsewhere as well...)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-02-29 23:54:46 +00:00
parent 793db75554
commit 52d9d823a1

View File

@@ -75,7 +75,9 @@ TAG_HANDLER_BEGIN(FONT, "FONT" )
{
wxFontEnumerator enu;
enu.EnumerateFacenames();
m_Faces = *enu.GetFacenames();
const wxArrayString *faces = enu.GetFacenames();
if ( faces )
m_Faces = *faces;
}
wxStringTokenizer tk(tag.GetParam(wxT("FACE")), wxT(","));
int index;