summaryrefslogtreecommitdiffstats
path: root/src/fakerw/fake.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-11 18:53:15 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-11 18:53:15 +0100
commita223157000fac3ba63699f04bc9e466f53a412e3 (patch)
tree54e1e672a564ffdb5d65e0748a86fae60f3eb895 /src/fakerw/fake.cpp
parentof course (diff)
downloadre3-a223157000fac3ba63699f04bc9e466f53a412e3.tar
re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.gz
re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.bz2
re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.lz
re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.xz
re3-a223157000fac3ba63699f04bc9e466f53a412e3.tar.zst
re3-a223157000fac3ba63699f04bc9e466f53a412e3.zip
Diffstat (limited to '')
-rw-r--r--src/fakerw/fake.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fakerw/fake.cpp b/src/fakerw/fake.cpp
index 863407b9..7f89c233 100644
--- a/src/fakerw/fake.cpp
+++ b/src/fakerw/fake.cpp
@@ -394,7 +394,7 @@ RwStream *RwStreamOpen(RwStreamType type, RwStreamAccessType accessType, const v
return nil;
}
}
-RwBool RwStreamClose(RwStream * stream, void *pData) { stream->close(); rwFree(stream); return true; }
+RwBool RwStreamClose(RwStream * stream, void *pData) { if (!stream) return false; stream->close(); rwFree(stream); return true; }
RwUInt32 RwStreamRead(RwStream * stream, void *buffer, RwUInt32 length) { return stream->read8(buffer, length); }
RwStream *RwStreamWrite(RwStream * stream, const void *buffer, RwUInt32 length) { stream->write8(buffer, length); return stream; }
RwStream *RwStreamSkip(RwStream * stream, RwUInt32 offset) { stream->seek(offset); return stream; }