[quote user="Bruce Reeves SRNS"]DgnFontCP newFont = DgnFontManager::FindSystemFont(L"Century Gothic"); // Optionally provide a filter to find only RSC, SHX, or TrueType fonts; must also check NULL. if ( newFont->IsValid() && newFont != nullptr )[/quote]
That test is incorrect. If newFont is NULL, the call to IsValid will cause an error. The fix is simple: reverse the order of test...
if ( newFont != nullptr && newFont->IsValid())