diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 1877a08e..96a3fdbd 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -1291,7 +1291,15 @@ void CHyprOpenGLImpl::clearWithTex() { static auto *const PRENDERTEX = &g_pConfigManager->getConfigValuePtr("misc:disable_hyprland_logo")->intValue; if (!*PRENDERTEX) { - renderTexture(m_mMonitorBGTextures[m_RenderData.pMonitor], &m_mMonitorRenderResources[m_RenderData.pMonitor].backgroundTexBox, 255, 0); + auto TEXIT = m_mMonitorBGTextures.find(m_RenderData.pMonitor); + + if (TEXIT == m_mMonitorBGTextures.end()) { + createBGTextureForMonitor(m_RenderData.pMonitor); + TEXIT = m_mMonitorBGTextures.find(m_RenderData.pMonitor); + } + + if (TEXIT != m_mMonitorBGTextures.end()) + renderTexture(TEXIT->second, &m_mMonitorRenderResources[m_RenderData.pMonitor].backgroundTexBox, 255, 0); } }