Nigel Liang : winecfg: Fix crash in graphics tab.
Module: wine Branch: master Commit: 4a21ad9f5cb5cf7c7865d27a7f8efd6deece982c URL: http://source.winehq.org/git/wine.git/?a=commit;h=4a21ad9f5cb5cf7c7865d27a7f... Author: Nigel Liang <ncliang(a)gmail.com> Date: Tue Aug 7 12:02:26 2007 -0700 winecfg: Fix crash in graphics tab. --- programs/winecfg/x11drvdlg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c index fbe0dad..0a4e597 100644 --- a/programs/winecfg/x11drvdlg.c +++ b/programs/winecfg/x11drvdlg.c @@ -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; }
participants (1)
-
Alexandre Julliard