diff --git a/widget/gtk/WaylandSurface.cpp b/widget/gtk/WaylandSurface.cpp --- a/widget/gtk/WaylandSurface.cpp +++ b/widget/gtk/WaylandSurface.cpp @@ -1043,13 +1043,15 @@ RefPtr aWaylandBuffer) { LOGWAYLAND("WaylandSurface::DetachedLocked() WaylandBuffer [%p]", aWaylandBuffer.get()); MOZ_DIAGNOSTIC_ASSERT(&aProofOfLock == mSurfaceLock); - bool removed = - CheckAndRemoveWaylandBuffer(aWaylandBuffer, /* aRemove */ true); - MOZ_DIAGNOSTIC_ASSERT(removed, "Wayland buffer is not attached?"); + if (!CheckAndRemoveWaylandBuffer(aWaylandBuffer, /* aRemove */ true)) { + MOZ_DIAGNOSTIC_ASSERT(false, "Wayland buffer is not attached?"); + NS_WARNING( + "WaylandSurface::DetachedLocked(): Wayland buffer is not attached?"); + } } // Place this WaylandSurface above aLowerSurface void WaylandSurface::PlaceAboveLocked(const WaylandSurfaceLock& aProofOfLock, WaylandSurfaceLock& aLowerSurfaceLock) {