Fix crash in Rule::apply (#4157)

This commit is contained in:
timoreo 2025-09-19 08:58:15 +02:00 committed by GitHub
commit 7390bfcaff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;