riched20: Fixed font cache corruption.

oldstable
Phil Krylov 2006-02-01 12:30:26 +01:00 committed by Alexandre Julliard
parent ef4fc8fd91
commit 1db48180f2
1 changed files with 2 additions and 2 deletions

View File

@ -317,7 +317,7 @@ HFONT ME_SelectStyleFont(ME_TextEditor *editor, HDC hDC, ME_Style *s)
if (item->nAge > nAge) if (item->nAge > nAge)
nEmpty = i, nAge = item->nAge; nEmpty = i, nAge = item->nAge;
} }
if (ME_IsFontEqual(&item->lfSpecs, &lf)) if (item->hFont && ME_IsFontEqual(&item->lfSpecs, &lf))
break; break;
} }
if (i < HFONT_CACHE_SIZE) /* found */ if (i < HFONT_CACHE_SIZE) /* found */
@ -372,7 +372,7 @@ void ME_UnselectStyleFont(ME_TextEditor *editor, HDC hDC, ME_Style *s, HFONT hOl
assert(0 == "UnselectStyleFont without SelectStyleFont"); assert(0 == "UnselectStyleFont without SelectStyleFont");
} }
void ME_DestroyStyle(ME_Style *s) { static void ME_DestroyStyle(ME_Style *s) {
if (s->hFont) if (s->hFont)
{ {
DeleteObject(s->hFont); DeleteObject(s->hFont);