X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..a7d354c6d75a32033f62b8ecadd837519b35b3ef:/src/common/fontcmn.cpp diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp index 0725335a58..a59e671c5b 100644 --- a/src/common/fontcmn.cpp +++ b/src/common/fontcmn.cpp @@ -284,6 +284,8 @@ void wxFontBase::DoSetNativeFontInfo(const wxNativeFontInfo& info) wxString wxFontBase::GetNativeFontInfoDesc() const { + wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") ); + wxString fontDesc; const wxNativeFontInfo *fontInfo = GetNativeFontInfo(); if ( fontInfo ) @@ -301,6 +303,8 @@ wxString wxFontBase::GetNativeFontInfoDesc() const wxString wxFontBase::GetNativeFontInfoUserDesc() const { + wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") ); + wxString fontDesc; const wxNativeFontInfo *fontInfo = GetNativeFontInfo(); if ( fontInfo )