The previous patch was made before refreshing the tree: this is done against the current one. Sorry for the mess.... Alberto Index: ole2.c =================================================================== RCS file: /home/wine/wine/dlls/ole32/ole2.c,v retrieving revision 1.40 diff -u -r1.40 ole2.c --- ole2.c 13 Jan 2003 20:37:39 -0000 1.40 +++ ole2.c 14 Jan 2003 12:36:32 -0000 @@ -1516,8 +1516,6 @@ if ( (pmedium->pUnkForRelease==0) && (pmedium->u.hGlobal!=0) ) GlobalFree(pmedium->u.hGlobal); - - pmedium->u.hGlobal = 0; break; } case TYMED_FILE: @@ -1531,8 +1529,6 @@ CoTaskMemFree(pmedium->u.lpszFileName); } - - pmedium->u.lpszFileName = 0; break; } case TYMED_ISTREAM: @@ -1541,8 +1537,6 @@ { IStream_Release(pmedium->u.pstm); } - - pmedium->u.pstm = 0; break; } case TYMED_ISTORAGE: @@ -1551,17 +1545,13 @@ { IStorage_Release(pmedium->u.pstg); } - - pmedium->u.pstg = 0; break; } case TYMED_GDI: { if ( (pmedium->pUnkForRelease==0) && - (pmedium->u.hGlobal!=0) ) - DeleteObject(pmedium->u.hGlobal); - - pmedium->u.hGlobal = 0; + (pmedium->u.hBitmap!=0) ) + DeleteObject(pmedium->u.hBitmap); break; } case TYMED_MFPICT: @@ -1569,13 +1559,11 @@ if ( (pmedium->pUnkForRelease==0) && (pmedium->u.hMetaFilePict!=0) ) { - LPMETAFILEPICT pMP = GlobalLock(pmedium->u.hGlobal); + LPMETAFILEPICT pMP = GlobalLock(pmedium->u.hMetaFilePict); DeleteMetaFile(pMP->hMF); - GlobalUnlock(pmedium->u.hGlobal); - GlobalFree(pmedium->u.hGlobal); + GlobalUnlock(pmedium->u.hMetaFilePict); + GlobalFree(pmedium->u.hMetaFilePict); } - - pmedium->u.hMetaFilePict = 0; break; } case TYMED_ENHMF: @@ -1585,14 +1573,13 @@ { DeleteEnhMetaFile(pmedium->u.hEnhMetaFile); } - - pmedium->u.hEnhMetaFile = 0; break; } case TYMED_NULL: default: break; } + pmedium->tymed=TYMED_NULL; /* * After cleaning up, the unknown is released