summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/main/canvas_item.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 1d263ba858..ec0821557b 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -995,12 +995,7 @@ Transform2D CanvasItem::get_viewport_transform() const {
ERR_FAIL_COND_V(!is_inside_tree(), Transform2D());
if (canvas_layer) {
- if (get_viewport()) {
- return get_viewport()->get_final_transform() * canvas_layer->get_transform();
- } else {
- return canvas_layer->get_transform();
- }
-
+ return get_viewport()->get_final_transform() * canvas_layer->get_transform();
} else {
return get_viewport()->get_final_transform() * get_viewport()->get_canvas_transform();
}