]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/fontutil.cpp
implemented (untested) work around for wxScrolledWindow painting bug
[wxWidgets.git] / src / mgl / fontutil.cpp
index 78d0443857cefe7eb7e6af43e2874300d152dd40..cc361b21b1cef8e655b31dea84f66d7e740d49f3 100644 (file)
@@ -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: