libos: Stop timers in the destructor if needed
Fixes some bug in InputField causing a crash.
This commit is contained in:
parent
05bf792dbd
commit
38fcd8e3e1
@ -110,6 +110,10 @@ namespace os
|
|||||||
|
|
||||||
Timer::~Timer()
|
Timer::~Timer()
|
||||||
{
|
{
|
||||||
if (m_timerid >= 0) timer_delete(m_timerid);
|
if (m_timerid >= 0)
|
||||||
|
{
|
||||||
|
if (!m_stopped) stop();
|
||||||
|
timer_delete(m_timerid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user