aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/networking/sdl_net/handlerutils.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/backends/networking/sdl_net/handlerutils.cpp b/backends/networking/sdl_net/handlerutils.cpp
index 121fd1a77e..73ddf9e83f 100644
--- a/backends/networking/sdl_net/handlerutils.cpp
+++ b/backends/networking/sdl_net/handlerutils.cpp
@@ -39,15 +39,14 @@ Common::Archive *HandlerUtils::getZipArchive() {
// first search in themepath
if (ConfMan.hasKey("themepath")) {
const Common::FSNode &node = Common::FSNode(ConfMan.get("themepath"));
- if (!node.exists() || !node.isReadable() || !node.isDirectory())
- return nullptr;
-
- Common::FSNode fileNode = node.getChild(ARCHIVE_NAME);
- if (fileNode.exists() && fileNode.isReadable() && !fileNode.isDirectory()) {
- Common::SeekableReadStream *const stream = fileNode.createReadStream();
- Common::Archive *zipArchive = Common::makeZipArchive(stream);
- if (zipArchive)
- return zipArchive;
+ if (node.exists() && node.isReadable() && node.isDirectory()) {
+ Common::FSNode fileNode = node.getChild(ARCHIVE_NAME);
+ if (fileNode.exists() && fileNode.isReadable() && !fileNode.isDirectory()) {
+ Common::SeekableReadStream *const stream = fileNode.createReadStream();
+ Common::Archive *zipArchive = Common::makeZipArchive(stream);
+ if (zipArchive)
+ return zipArchive;
+ }
}
}