diff --git a/klipper/history.cpp b/klipper/history.cpp index 823aa36cd..7c9a68f72 100644 --- a/klipper/history.cpp +++ b/klipper/history.cpp @@ -92,6 +92,10 @@ void History::trim() { if (m_items.size()<=1) { m_nextCycle = 0L; } + if (m_items.isEmpty()) { + // force top to nullptr + m_top = nullptr; + } emit changed(); }