Phil Krylov : riched20: Fixed font cache corruption.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 1 06:59:14 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 1db48180f2bb36901a6a05d86f0f0d00e70c538e
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=1db48180f2bb36901a6a05d86f0f0d00e70c538e

Author: Phil Krylov <phil at newstar.rinet.ru>
Date:   Wed Feb  1 12:30:26 2006 +0100

riched20: Fixed font cache corruption.

---

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

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);




More information about the wine-cvs mailing list