diff options
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; } |