diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp index de7359a18b2..ec12999c2c3 100644 --- a/drivers/gles2/rasterizer_storage_gles2.cpp +++ b/drivers/gles2/rasterizer_storage_gles2.cpp @@ -506,8 +506,8 @@ Ref RasterizerStorageGLES2::texture_get_data(RID p_texture, VS::CubeMapSi return Ref(img); #else - ERR_EXPLAIN("Sorry, It's not posible to obtain images back in OpenGL ES"); - return Ref(); + ERR_EXPLAIN("Sorry, It's not possible to obtain images back in OpenGL ES"); + ERR_FAIL_V(Ref()); #endif } diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 11ab957458b..66a8a931e21 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -962,7 +962,7 @@ Ref RasterizerStorageGLES3::texture_get_data(RID p_texture, VS::CubeMapSi #else ERR_EXPLAIN("Sorry, It's not possible to obtain images back in OpenGL ES"); - return Ref(); + ERR_FAIL_V(Ref()); #endif }