diff options
Diffstat (limited to 'drivers/gles3/storage/utilities.cpp')
-rw-r--r-- | drivers/gles3/storage/utilities.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gles3/storage/utilities.cpp b/drivers/gles3/storage/utilities.cpp index a2d1ba376a..7b70ed74be 100644 --- a/drivers/gles3/storage/utilities.cpp +++ b/drivers/gles3/storage/utilities.cpp @@ -71,6 +71,11 @@ Utilities::~Utilities() { Vector<uint8_t> Utilities::buffer_get_data(GLenum p_target, GLuint p_buffer, uint32_t p_buffer_size) { Vector<uint8_t> ret; + + if (p_buffer_size == 0) { + return ret; + } + ret.resize(p_buffer_size); glBindBuffer(p_target, p_buffer); |