Skip to content

Commit

Permalink
null チェック
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Jan 16, 2024
1 parent 290899e commit 786805a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sora.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ Sora::ConvertForwardingFilter(const nb::handle value) {

try {
auto object = forwarding_filter_value.as_object();
filter.action = std::string(object["action"].as_string());
if (!object["action"].is_null()) {
filter.action = std::string(object["action"].as_string());
}
for (auto or_rule : object["rules"].as_array()) {
std::vector<sora::SoraSignalingConfig::ForwardingFilter::Rule> rules;
for (auto and_rule_value : or_rule.as_array()) {
Expand Down

0 comments on commit 786805a

Please sign in to comment.