[PATCH] winecfg: Fix crash in graphics tab
Nigel Liang
ncliang at gmail.com
Tue Aug 7 14:02:26 CDT 2007
diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c
index 5f6e2d6..9cfff2a 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;
}
--
1.4.1
More information about the wine-patches
mailing list