ensure texture safety in clearWithTex()

This commit is contained in:
vaxerski 2022-10-09 17:02:32 +01:00
parent 1263bd5dcb
commit 496e37d044

View file

@ -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);
}
}