summaryrefslogtreecommitdiffstats
path: root/core/io/file_access_encrypted.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-03 16:13:55 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-03 16:13:55 +0200
commitd15de6f264bc3659310c19bc402a432e2ea896e3 (patch)
treedeb293154752257941ca8852de4eec167ff9d3b7 /core/io/file_access_encrypted.cpp
parentb104f218410669ec81ec9ffd4d8833b8aa30a554 (diff)
parent194bdde94787227e8f53a4e3273c192ab70b03ac (diff)
downloadredot-engine-d15de6f264bc3659310c19bc402a432e2ea896e3.tar.gz
Merge pull request #96292 from AThousandShips/null_check_ref_fix
Cleanup of raw `nullptr` checks with `Ref`
Diffstat (limited to 'core/io/file_access_encrypted.cpp')
-rw-r--r--core/io/file_access_encrypted.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp
index 605c5b2f6f..13d1e0c8fc 100644
--- a/core/io/file_access_encrypted.cpp
+++ b/core/io/file_access_encrypted.cpp
@@ -37,7 +37,7 @@
#include <stdio.h>
Error FileAccessEncrypted::open_and_parse(Ref<FileAccess> p_base, const Vector<uint8_t> &p_key, Mode p_mode, bool p_with_magic) {
- ERR_FAIL_COND_V_MSG(file != nullptr, ERR_ALREADY_IN_USE, "Can't open file while another file from path '" + file->get_path_absolute() + "' is open.");
+ ERR_FAIL_COND_V_MSG(file.is_valid(), ERR_ALREADY_IN_USE, "Can't open file while another file from path '" + file->get_path_absolute() + "' is open.");
ERR_FAIL_COND_V(p_key.size() != 32, ERR_INVALID_PARAMETER);
pos = 0;
@@ -162,7 +162,7 @@ void FileAccessEncrypted::_close() {
}
bool FileAccessEncrypted::is_open() const {
- return file != nullptr;
+ return file.is_valid();
}
String FileAccessEncrypted::get_path() const {