aboutsummaryrefslogtreecommitdiff
path: root/sword2/resman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sword2/resman.cpp')
-rw-r--r--sword2/resman.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/sword2/resman.cpp b/sword2/resman.cpp
index 7718f9426e..ee0162aa98 100644
--- a/sword2/resman.cpp
+++ b/sword2/resman.cpp
@@ -521,11 +521,8 @@ uint8 *ResourceManager::openResource(uint32 res, bool dump) {
sprintf(buf, "dumps/%s-%d.dmp", tag, res);
#endif
- out.open(buf, "");
-
- if (!out.isOpen()) {
- out.open(buf, "", File::kFileWriteMode);
- if (out.isOpen())
+ if (!out.open(buf, "")) {
+ if (out.open(buf, "", File::kFileWriteMode))
out.write(_resList[res]->ad, len);
}