summaryrefslogtreecommitdiffstats
path: root/core/io/file_access_network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/file_access_network.cpp')
-rw-r--r--core/io/file_access_network.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp
index 97838fd14c..e09c3552ef 100644
--- a/core/io/file_access_network.cpp
+++ b/core/io/file_access_network.cpp
@@ -366,6 +366,9 @@ void FileAccessNetwork::_queue_page(int p_page) const {
}
int FileAccessNetwork::get_buffer(uint8_t *p_dst, int p_length) const {
+ ERR_FAIL_COND_V(!p_dst, -1);
+ ERR_FAIL_COND_V(p_length < 0, -1);
+
//bool eof=false;
if (pos + p_length > total_size) {
eof_flag = true;