From b80c72c7ddbf79147d64759c8659eb5939d0327e Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 29 Nov 2023 13:36:37 +0000 Subject: [PATCH] groupbar: fix crash in renderGradientTo fixes #3985 --- src/render/decorations/CHyprGroupBarDecoration.cpp | 3 +++ 1 file changed, 3 insertions(+) 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);