aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/dataio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/gob/dataio.cpp')
-rw-r--r--engines/gob/dataio.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp
index f59fa80e8d..99cf7c1193 100644
--- a/engines/gob/dataio.cpp
+++ b/engines/gob/dataio.cpp
@@ -488,6 +488,9 @@ int16 DataIO::openData(const char *path) {
}
bool DataIO::existData(const char *path) {
+ if (!path || (path[0] == '\0'))
+ return false;
+
int16 handle = openData(path);
if (handle < 0)
@@ -584,7 +587,7 @@ byte *DataIO::getData(const char *path) {
}
DataStream *DataIO::getDataStream(const char *path) {
- if (!path || (path[0] == '\0') || !existData(path))
+ if (!existData(path))
return 0;
uint32 size = getDataSize(path);