From 4a21ad9f5cb5cf7c7865d27a7f8efd6deece982c Mon Sep 17 00:00:00 2001 From: Nigel Liang Date: Tue, 7 Aug 2007 12:02:26 -0700 Subject: [PATCH] winecfg: Fix crash in graphics tab. --- programs/winecfg/x11drvdlg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c index fbe0dadf418..0a4e5971022 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; }