diff --git a/packages/bonsoir_windows/windows/bonsoir_action.h b/packages/bonsoir_windows/windows/bonsoir_action.h index 3a3fbb7c..20b9fc96 100644 --- a/packages/bonsoir_windows/windows/bonsoir_action.h +++ b/packages/bonsoir_windows/windows/bonsoir_action.h @@ -87,7 +87,7 @@ namespace bonsoir_windows { onEvent(successObjectPtr, successParameters); } - void onError(EncodableValue details, std::list parameters = std::list(), std::optional message = nullptr) { + void onError(EncodableValue details, std::list parameters = std::list(), std::optional message = std::nullopt) { std::string errorMessage = format(message.value_or(logMessages.find(action + "Error")->second), parameters); std::shared_ptr errorObjectPtr = std::make_shared(errorMessage, details); diff --git a/packages/bonsoir_windows/windows/bonsoir_broadcast.cpp b/packages/bonsoir_windows/windows/bonsoir_broadcast.cpp index da80dd87..ab782890 100644 --- a/packages/bonsoir_windows/windows/bonsoir_broadcast.cpp +++ b/packages/bonsoir_windows/windows/bonsoir_broadcast.cpp @@ -80,6 +80,9 @@ namespace bonsoir_windows { if (!(broadcast->isRunning())) { return; } + if (instance == nullptr || instance->pszInstanceName == nullptr) { + return; + } std::string name = std::get<0>(parseBonjourFqdn(toUtf8(instance->pszInstanceName))); if (name == "") { return;