mirror of
https://github.com/polybar/polybar.git
synced 2026-02-20 02:05:48 +00:00
fix(timer_module): Ensure that interval > 0 (#2274)
Since 3.5.0, we use m_interval for a modulo operation, this crashes the bar if the interval is 0. A non-positive interval shouldn't be allowed anyway, so we now throw an exception in that case. Fixes #2273
This commit is contained in:
@ -30,7 +30,7 @@ namespace modules {
|
||||
m_remove_unmounted = m_conf.get(name(), "remove-unmounted", m_remove_unmounted);
|
||||
m_fixed = m_conf.get(name(), "fixed-values", m_fixed);
|
||||
m_spacing = m_conf.get(name(), "spacing", m_spacing);
|
||||
m_interval = m_conf.get<decltype(m_interval)>(name(), "interval", 30s);
|
||||
set_interval(30s);
|
||||
|
||||
// Add formats and elements
|
||||
m_formatter->add(
|
||||
|
||||
Reference in New Issue
Block a user