framescheduler: check monitor validity in doLater
This commit is contained in:
parent
a05c797e4a
commit
49abc193f7
1 changed files with 2 additions and 0 deletions
|
|
@ -53,6 +53,8 @@ void CMonitorFrameScheduler::onPresented() {
|
||||||
m_pendingThird = false;
|
m_pendingThird = false;
|
||||||
|
|
||||||
g_pEventLoopManager->doLater([m = m_monitor.lock()] {
|
g_pEventLoopManager->doLater([m = m_monitor.lock()] {
|
||||||
|
if (!m)
|
||||||
|
return;
|
||||||
g_pHyprRenderer->commitPendingAndDoExplicitSync(m); // commit the pending frame. If it didn't fire yet (is not rendered) it doesn't matter. Syncs will wait.
|
g_pHyprRenderer->commitPendingAndDoExplicitSync(m); // commit the pending frame. If it didn't fire yet (is not rendered) it doesn't matter. Syncs will wait.
|
||||||
|
|
||||||
// schedule a frame: we might have some missed damage, which got cleared due to the above commit.
|
// schedule a frame: we might have some missed damage, which got cleared due to the above commit.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue