X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b8ec418aee4e38877d4cb79e2984c766dcc358..94e2ed3b8db0220160c0b939782cd46914ec073a:/src/mgl/fontutil.cpp diff --git a/src/mgl/fontutil.cpp b/src/mgl/fontutil.cpp index a899e033f6..cc361b21b1 100644 --- a/src/mgl/fontutil.cpp +++ b/src/mgl/fontutil.cpp @@ -4,7 +4,7 @@ // Author: Vaclav Slavik // Created: 2001/04/29 // RCS-ID: $Id$ -// Copyright: (c) 2001, Vaclav Slavik +// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// @@ -323,20 +323,17 @@ bool wxMGLFontFamily::HasFace(int type) const wxMGLFontLibrary *wxFontsManager::GetFontLibrary(wxFont *font) { wxMGLFontFamily *family; - wxString facename; int type; + wxString facename = font->GetFaceName(); - if ( facename ) - family = GetFamily(font->GetFaceName()); + if ( !facename.IsEmpty() ) + family = GetFamily(facename); else family = NULL; - if ( family ) - facename = font->GetFaceName(); - else - facename.Empty(); - + if ( !family ) { + facename.Empty(); switch (font->GetFamily()) { case wxSCRIPT: