riched20: Fixed font cache corruption

Phil Krylov phil at newstar.rinet.ru
Tue Jan 31 16:07:55 CST 2006


ChangeLog:

Fixed font cache corruption in riched20.

---

 dlls/riched20/style.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

10e51f0bb86fba3bde1783c966960f7c748b07f7
diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c
index 56f9842..804cc16 100644
--- a/dlls/riched20/style.c
+++ b/dlls/riched20/style.c
@@ -317,7 +317,7 @@ HFONT ME_SelectStyleFont(ME_TextEditor *
       if (item->nAge > nAge)
         nEmpty = i, nAge = item->nAge;
     }
-    if (ME_IsFontEqual(&item->lfSpecs, &lf))
+    if (item->hFont && ME_IsFontEqual(&item->lfSpecs, &lf))
       break;
   }
   if (i < HFONT_CACHE_SIZE) /* found */
@@ -372,7 +372,7 @@ void ME_UnselectStyleFont(ME_TextEditor 
   assert(0 == "UnselectStyleFont without SelectStyleFont");
 }
 
-void ME_DestroyStyle(ME_Style *s) {
+static void ME_DestroyStyle(ME_Style *s) {
   if (s->hFont)
   {
     DeleteObject(s->hFont);
-- 
1.0.GIT



More information about the wine-patches mailing list