fixing r* visioned leak

This commit is contained in:
Sergeanur 2020-04-11 00:36:11 +03:00
parent df872a26b0
commit f1413c4776

View file

@ -260,11 +260,13 @@ CreateTxdImageForVideoCard()
RwStream *img = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMWRITE, "models\\txd.img"); RwStream *img = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMWRITE, "models\\txd.img");
if (img == nil) { if (img == nil) {
if (_dwOperatingSystemVersion == OS_WINNT || _dwOperatingSystemVersion == OS_WIN2000 || _dwOperatingSystemVersion == OS_WINXP) { // original code does otherwise and it leaks
DealWithTxdWriteError(0, TXDSTORESIZE, "CVT_CRT");
delete []buf; delete []buf;
delete pDir; delete pDir;
}
if (_dwOperatingSystemVersion == OS_WINNT || _dwOperatingSystemVersion == OS_WIN2000 || _dwOperatingSystemVersion == OS_WINXP)
DealWithTxdWriteError(0, TXDSTORESIZE, "CVT_CRT");
return false; return false;
} }