Code: Select all
string(REGEX REPLACE "/EHsc" "/EHs-c-" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
add_definitions(-D_HAS_EXCEPTIONS=0) # for STL
call stack shows `wxApp::GetTraitsIfExists()` returned invalid value 0x0000000000000001
Code: Select all
/* static */
wxFontMapperBase *wxFontMapperBase::Get()
{
if ( !sm_instance )
{
wxAppTraits *traits = wxApp::GetTraitsIfExists();
// !!! crash here, value of traits is 0x0000000000000001
if ( traits )
{
sm_instance = traits->CreateFontMapper();
wxASSERT_MSG( sm_instance,
wxT("wxAppTraits::CreateFontMapper() failed") );
}
if ( !sm_instance )
{
// last resort: we must create something because the existing code
// relies on always having a valid font mapper object
sm_instance = (wxFontMapper *)new wxFontMapperBase;
}
}
return (wxFontMapperBase*)sm_instance;
}
any idea? TIA!