Explicit error message when setting active a Viewport that is already active.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
parent
b27683111b
commit
e3be0913d7
1 changed files with 1 additions and 1 deletions
|
@ -694,7 +694,7 @@ void RendererViewport::viewport_set_active(RID p_viewport, bool p_active) {
|
||||||
ERR_FAIL_COND(!viewport);
|
ERR_FAIL_COND(!viewport);
|
||||||
|
|
||||||
if (p_active) {
|
if (p_active) {
|
||||||
ERR_FAIL_COND(active_viewports.find(viewport) != -1); //already active
|
ERR_FAIL_COND_MSG(active_viewports.find(viewport) != -1, "Can't make active a Viewport that is already active.");
|
||||||
viewport->occlusion_buffer_dirty = true;
|
viewport->occlusion_buffer_dirty = true;
|
||||||
active_viewports.push_back(viewport);
|
active_viewports.push_back(viewport);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue