From 57eaea571af62e758453e8da9116ebfdcb86ff7e Mon Sep 17 00:00:00 2001 From: Leon Krause Date: Thu, 12 Jul 2018 16:47:06 +0200 Subject: [PATCH] Fix missing texture-download error with OpenGL ES --- drivers/gles2/rasterizer_storage_gles2.cpp | 4 ++-- drivers/gles3/rasterizer_storage_gles3.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }