mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-05-19 08:30:22 -07:00
guard primaryFB tex in end()
This commit is contained in:
parent
9e227a52c0
commit
d193d70ecf
@ -74,6 +74,7 @@ void CFramebuffer::release() {
|
||||
|
||||
m_cTex.m_iTexID = 0;
|
||||
m_iFb = -1;
|
||||
m_Size = Vector2D();
|
||||
}
|
||||
|
||||
CFramebuffer::~CFramebuffer() {
|
||||
|
@ -133,6 +133,18 @@ void CHyprOpenGLImpl::end() {
|
||||
|
||||
clear(CColor(11, 11, 11, 255));
|
||||
|
||||
if (m_RenderData.pCurrentMonData->primaryFB.m_cTex.m_iTexID == 0) {
|
||||
Debug::log(ERR, "Couldn't end() frame (primary FB tex null???)");
|
||||
|
||||
// this apparently sometimes happens during lid switches... for some people?
|
||||
// release all resources, will be recalc'd
|
||||
destroyMonitorResources(m_RenderData.pMonitor);
|
||||
|
||||
m_RenderData.pMonitor = nullptr;
|
||||
m_iWLROutputFb = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
m_bEndFrame = true;
|
||||
|
||||
renderTexture(m_RenderData.pCurrentMonData->primaryFB.m_cTex, &monbox, 255.f, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user