diff --git a/libos/src/Timer.cpp b/libos/src/Timer.cpp index 42db3804..f8309abd 100644 --- a/libos/src/Timer.cpp +++ b/libos/src/Timer.cpp @@ -110,6 +110,10 @@ namespace os Timer::~Timer() { - if (m_timerid >= 0) timer_delete(m_timerid); + if (m_timerid >= 0) + { + if (!m_stopped) stop(); + timer_delete(m_timerid); + } } }