diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/io/file_access_buffered_fa.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h index 6e806e7b3f..c8cee04208 100644 --- a/core/io/file_access_buffered_fa.h +++ b/core/io/file_access_buffered_fa.h @@ -40,10 +40,7 @@ class FileAccessBufferedFA : public FileAccessBuffered { int read_data_block(int p_offset, int p_size, uint8_t *p_dest = 0) const { - if (!f.is_open()) { - ERR_EXPLAIN("Can't read data block, when file is not opened."); - ERR_FAIL_V(-1); - } + ERR_FAIL_COND_V_MSG(!f.is_open(), -1, "Can't read data block when file is not opened."); ((T *)&f)->seek(p_offset); |