Fix crash in Rule::apply

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad
2025-09-19 00:25:26 +01:00
parent 1724bdaeb9
commit 5d46f79f19

View File

@@ -85,7 +85,7 @@ QJsonObject Rule::toJson()
Rule::Action Rule::apply(const RuntimeContext& runtimeContext)
{
if (!runtimeContext.classifierMatches(m_os->name))
if (m_os.has_value() && !runtimeContext.classifierMatches(m_os->name))
return Defer;
return m_action;