Commit 363cd007 authored by David Faure's avatar David Faure
Browse files

Fix crash in my recently-added autocorrect check

parent 26569483
Pipeline #54808 passed with stage
in 23 seconds
......@@ -86,6 +86,7 @@ private Q_SLOTS:
T("Mar 01-Mar Su[-2] Mo 17:00-18:00; PH off");
T("Oct Su[-1]-Dec 31 08:00-18:00");
T("Oct Su[-1]-Dec 31 Su 08:00-18:00");
T("Mar Su[1]-Oct Su[1]: 11:00-20:00; PH 11:00-20:00");
// from https://wiki.openstreetmap.org/wiki/Key:opening_hours#Simple_examples
T("Mo-Fr 08:00-17:30");
......
......@@ -107,7 +107,7 @@ void OpeningHoursPrivate::autocorrect()
else if (rule->selectorCount() == prevRule->selectorCount()
&& rule->m_timeSelector
&& prevRule->m_timeSelector
&& rule->selectorCount() == 2 && rule->m_weekdaySelector
&& rule->selectorCount() == 2 && rule->m_weekdaySelector && prevRule->m_weekdaySelector
// slower than writing an operator==, but so much easier to write :)
&& rule->m_weekdaySelector->toExpression() == prevRule->m_weekdaySelector->toExpression()
) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment