this patch prevent some crashes in 16 bit DDEML A+
Name: dde16 ChangeLog: fixed some NULL pointer handling errors License: X11 GenDate: 2002/10/06 19:21:02 UTC ModifiedFiles: dlls/user/dde/ddeml16.c AddedFiles: =================================================================== RCS file: /home/cvs/cvsroot/wine/wine/dlls/user/dde/ddeml16.c,v retrieving revision 1.7 diff -u -u -r1.7 ddeml16.c --- dlls/user/dde/ddeml16.c 31 May 2002 23:40:54 -0000 1.7 +++ dlls/user/dde/ddeml16.c 18 Aug 2002 20:10:51 -0000 @@ -101,7 +101,7 @@ HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hdata, DWORD dwData1, DWORD dwData2) { - DWORD d1; + DWORD d1 = 0; HDDEDATA ret; CONVCONTEXT16 cc16; @@ -109,8 +109,12 @@ { case XTYP_CONNECT: case XTYP_WILDCONNECT: - map3216_conv_context(&cc16, (const CONVCONTEXT*)dwData1); - d1 = MapLS(&cc16); + if (dwData1) + { + map3216_conv_context(&cc16, (const CONVCONTEXT*)dwData1); + d1 = MapLS(&cc16); + } + else break; default: d1 = dwData1; @@ -122,7 +126,7 @@ { case XTYP_CONNECT: case XTYP_WILDCONNECT: - UnMapLS(d1); + if (d1 != 0) UnMapLS(d1); break; } return ret;