Ensure canvas copy texscreen will not crash if render target is configured without copy buffers. Closes #24749.

This commit is contained in:
Juan Linietsky 2019-01-15 15:13:58 -03:00
parent 7d5c970eff
commit ca03d7e0d7

View file

@ -1144,6 +1144,11 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
void RasterizerCanvasGLES3::_copy_texscreen(const Rect2 &p_rect) {
if (storage->frame.current_rt->effects.mip_maps[0].sizes.size() == 0) {
ERR_EXPLAIN("Can't use screen texture copying in a render target configured without copy buffers");
ERR_FAIL();
}
glDisable(GL_BLEND);
state.canvas_texscreen_used = true;