summaryrefslogtreecommitdiffstats
path: root/src/core/RwTexRead.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-04-10 23:36:11 +0200
committerSergeanur <s.anureev@yandex.ua>2020-04-10 23:36:11 +0200
commitf1413c477692b935b14e8ef69ea8e4aeb3dd2e7f (patch)
treed46222416ca83ea35c16a61abc7909a37f292ce5 /src/core/RwTexRead.cpp
parentfuck you git, i fixed this already (diff)
downloadre3-f1413c477692b935b14e8ef69ea8e4aeb3dd2e7f.tar
re3-f1413c477692b935b14e8ef69ea8e4aeb3dd2e7f.tar.gz
re3-f1413c477692b935b14e8ef69ea8e4aeb3dd2e7f.tar.bz2
re3-f1413c477692b935b14e8ef69ea8e4aeb3dd2e7f.tar.lz
re3-f1413c477692b935b14e8ef69ea8e4aeb3dd2e7f.tar.xz
re3-f1413c477692b935b14e8ef69ea8e4aeb3dd2e7f.tar.zst
re3-f1413c477692b935b14e8ef69ea8e4aeb3dd2e7f.zip
Diffstat (limited to 'src/core/RwTexRead.cpp')
-rw-r--r--src/core/RwTexRead.cpp10
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;
}