mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 08:18:59 +00:00
fixing r* visioned leak
This commit is contained in:
parent
df872a26b0
commit
f1413c4776
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||||
|
delete []buf;
|
||||||
|
delete pDir;
|
||||||
|
|
||||||
|
if (_dwOperatingSystemVersion == OS_WINNT || _dwOperatingSystemVersion == OS_WIN2000 || _dwOperatingSystemVersion == OS_WINXP)
|
||||||
DealWithTxdWriteError(0, TXDSTORESIZE, "CVT_CRT");
|
DealWithTxdWriteError(0, TXDSTORESIZE, "CVT_CRT");
|
||||||
delete []buf;
|
|
||||||
delete pDir;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue