diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-11 01:04:56 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-11 01:04:56 +0200 |
commit | c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33 (patch) | |
tree | 24985c610beec3d1e4ac1804851467b40d8ccb02 /src/core/RwTexRead.cpp | |
parent | Record (diff) | |
parent | fixing r* visioned leak (diff) | |
download | re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.gz re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.bz2 re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.lz re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.xz re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.tar.zst re3-c8ac25ebfdd068efb3c1aa53fcbd4efd0f7f6b33.zip |
Diffstat (limited to 'src/core/RwTexRead.cpp')
-rw-r--r-- | src/core/RwTexRead.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/RwTexRead.cpp b/src/core/RwTexRead.cpp index ef1ac197..49b245dd 100644 --- a/src/core/RwTexRead.cpp +++ b/src/core/RwTexRead.cpp @@ -260,11 +260,13 @@ CreateTxdImageForVideoCard() RwStream *img = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMWRITE, "models\\txd.img"); 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"); - delete []buf; - delete pDir; - } + return false; } |