Fix premature DC release

svn path=/branches/gtk-2-10/; revision=17621
This commit is contained in:
Cody Russell
2007-04-23 18:44:15 +00:00
parent cab5e86171
commit ec2caa4bae
2 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,11 @@
2007-04-23 Cody Russell <bratsche@gnome.org>
Backported from trunk:
* modules/engines/ms-windows/msw_style.c: Fix prematurely
released DC that prevented fonts with multi-byte font names from
being loaded. (#404506, Hiroyuki Yamamoto)
2007-04-23 Matthias Clasen <mclasen@redhat.com>
Mreged from trunk:

View File

@@ -466,12 +466,15 @@ sys_font_to_pango_font (XpThemeClass klazz, XpThemeFont type, char *buf,
{
pt_size = -MulDiv (lf.lfHeight, 72,
GetDeviceCaps (hDC, LOGPIXELSY));
ReleaseDC (hwnd, hDC);
}
else
pt_size = 10;
font = get_family_name (&lf, hDC);
if (hDC)
ReleaseDC (hwnd, hDC);
if(!(font && *font))
return NULL;