From 23f8ab8a77b9ea3a34476c70b9c11367e85ffb6f Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 16 Mar 2024 05:38:30 +0300 Subject: [PATCH] scissors fix --- src/graphics/GfxContext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graphics/GfxContext.cpp b/src/graphics/GfxContext.cpp index 57557942..da306fd4 100644 --- a/src/graphics/GfxContext.cpp +++ b/src/graphics/GfxContext.cpp @@ -15,16 +15,16 @@ GfxContext::GfxContext( {} GfxContext::~GfxContext() { + if (g2d) { + g2d->flush(); + } + while (scissorsCount--) { Window::popScissor(); } if (parent == nullptr) return; - - if (g2d) { - g2d->flush(); - } if (fbo != parent->fbo) { if (fbo) {