From b444bec1f3100aab0003fd6bc422430ee7e4905a Mon Sep 17 00:00:00 2001 From: TaskManagerCZ <71282895+TaskManagerCZ@users.noreply.github.com> Date: Mon, 12 Jul 2021 10:55:53 +0200 Subject: [PATCH] Explicit error message when setting active a Viewport that is already active. Co-authored-by: Hugo Locurcio (cherry picked from commit e3be0913d73bdc1ff45acef30209df519c0eff2a) --- servers/visual/visual_server_viewport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp index 1b2c1f85c25..d28646bbb72 100644 --- a/servers/visual/visual_server_viewport.cpp +++ b/servers/visual/visual_server_viewport.cpp @@ -396,7 +396,7 @@ void VisualServerViewport::viewport_set_active(RID p_viewport, bool p_active) { ERR_FAIL_COND(!viewport); 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."); active_viewports.push_back(viewport); } else { active_viewports.erase(viewport);