Skip to content

Commit

Permalink
core: avoid crash in done callbacks
Browse files Browse the repository at this point in the history
fixes #89
  • Loading branch information
vaxerski committed Sep 30, 2024
1 parent 4d6d01c commit 3b42f6b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/helpers/LayerSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,7 @@ void CLayerSurface::sendFrame() {

void CLayerSurface::markDirty() {
frameCallback = makeShared<CCWlCallback>(pSurface->sendFrame());
frameCallback->setDone([this](CCWlCallback* r, uint32_t when) {
frameCallback.reset();

if (dirty || !rendered)
g_pHyprpicker->renderSurface(g_pHyprpicker->m_pLastSurface);
});
frameCallback->setDone([this](CCWlCallback* r, uint32_t when) { onCallbackDone(this, when); });
pSurface->sendCommit();

dirty = true;
Expand Down

0 comments on commit 3b42f6b

Please sign in to comment.