diff --git a/src/Hyprpaper.cpp b/src/Hyprpaper.cpp index d895fe0..b142084 100644 --- a/src/Hyprpaper.cpp +++ b/src/Hyprpaper.cpp @@ -199,8 +199,8 @@ void CHyprpaper::ensurePoolBuffersPresent() { if (m->size == Vector2D()) continue; - auto it = std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [&](const std::unique_ptr& el) { - return el->target == wt.m_szPath && el->pixelSize == m->size * m->scale; + auto it = std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [wt = &wt, &m](const std::unique_ptr& el) { + return el->target == wt->m_szPath && el->pixelSize == m->size * m->scale; }); if (it == m_vBuffers.end()) {