diff --git a/src/protocols/SessionLock.cpp b/src/protocols/SessionLock.cpp index 4c4b1846..9b3062ea 100644 --- a/src/protocols/SessionLock.cpp +++ b/src/protocols/SessionLock.cpp @@ -22,7 +22,7 @@ CSessionLockSurface::CSessionLockSurface(SP resource_, hyprListener_surfaceCommit.initCallback( &pSurface->events.commit, [this](void* owner, void* data) { - if (!pSurface->current.buffer) { + if (pSurface->pending.buffer_width <= 0 || pSurface->pending.buffer_height <= 0) { LOGM(ERR, "SessionLock attached a null buffer"); wl_resource_post_error(resource->resource(), EXT_SESSION_LOCK_SURFACE_V1_ERROR_NULL_BUFFER, "Null buffer attached"); return;