winecfg: Fix crash in graphics tab.

oldstable
Nigel Liang 2007-08-07 12:02:26 -07:00 committed by Alexandre Julliard
parent 6e56e37b2d
commit 4a21ad9f5c
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ static INT read_logpixels_reg(void)
DWORD dwLogPixels;
char *buf = get_reg_key(HKEY_LOCAL_MACHINE, logpixels_reg,
"LogPixels", NULL);
dwLogPixels = *buf;
dwLogPixels = buf ? *buf : DEFDPI;
HeapFree(GetProcessHeap(), 0, buf);
return dwLogPixels;
}