summaryrefslogtreecommitdiff
path: root/src/render/decorations/CHyprGroupBarDecoration.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-11-29 13:36:37 +0000
committerVaxry <vaxry@vaxry.net>2023-11-29 13:36:37 +0000
commitb80c72c7ddbf79147d64759c8659eb5939d0327e (patch)
treeab6e2e038b2a14194cb396931305d9c69fa51a8a /src/render/decorations/CHyprGroupBarDecoration.cpp
parent3caaa483d4bf8f18f62f8a8f03a0922ea8a4cb7e (diff)
groupbar: fix crash in renderGradientTo
fixes #3985
Diffstat (limited to 'src/render/decorations/CHyprGroupBarDecoration.cpp')
-rw-r--r--src/render/decorations/CHyprGroupBarDecoration.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp
index f315f56a..ae1d76a7 100644
--- a/src/render/decorations/CHyprGroupBarDecoration.cpp
+++ b/src/render/decorations/CHyprGroupBarDecoration.cpp
@@ -238,6 +238,9 @@ CTitleTex::~CTitleTex() {
void renderGradientTo(CTexture& tex, const CColor& grad) {
+ if (!g_pCompositor->m_pLastMonitor)
+ return;
+
const Vector2D& bufferSize = g_pCompositor->m_pLastMonitor->vecPixelSize;
const auto CAIROSURFACE = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, bufferSize.x, bufferSize.y);