summaryrefslogtreecommitdiffstats
path: root/src/core/RwTexRead.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-11 19:33:46 +0200
committeraap <aap@papnet.eu>2020-04-11 19:33:46 +0200
commitc307e72fa0f40a8c4695505fa31aa85d0bbb460c (patch)
tree51d2b19218a2710928102b5278012b1139255032 /src/core/RwTexRead.cpp
parentfixed traffic light position (diff)
parentFix cutscene camera latency (diff)
downloadre3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.gz
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.bz2
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.lz
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.xz
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.tar.zst
re3-c307e72fa0f40a8c4695505fa31aa85d0bbb460c.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;
}