libos: Stop timers in the destructor if needed

Fixes some bug in InputField causing a crash.
This commit is contained in:
apio 2024-09-19 18:26:42 +02:00
parent 05bf792dbd
commit 38fcd8e3e1
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -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);
}
}
}