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
No known key found for this signature in database
GPG key ID: 5E39D70B4C93C38E

View file

@ -85,7 +85,7 @@ QJsonObject Rule::toJson()
Rule::Action Rule::apply(const RuntimeContext& runtimeContext) 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 Defer;
return m_action; return m_action;