summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSönke Holz <sholz8530@gmail.com>2021-08-13 11:21:34 +0200
committerSönke Holz <sholz8530@gmail.com>2021-08-13 11:21:34 +0200
commitb18e1d031f5c14a84b70f25ac97a01602ff1e063 (patch)
treeb71b98c554cf5061b3d8c88e718a7b19d61ef403
parentconfiguration: move network_interface include to source file (diff)
downloadyuzu-b18e1d031f5c14a84b70f25ac97a01602ff1e063.tar
yuzu-b18e1d031f5c14a84b70f25ac97a01602ff1e063.tar.gz
yuzu-b18e1d031f5c14a84b70f25ac97a01602ff1e063.tar.bz2
yuzu-b18e1d031f5c14a84b70f25ac97a01602ff1e063.tar.lz
yuzu-b18e1d031f5c14a84b70f25ac97a01602ff1e063.tar.xz
yuzu-b18e1d031f5c14a84b70f25ac97a01602ff1e063.tar.zst
yuzu-b18e1d031f5c14a84b70f25ac97a01602ff1e063.zip
-rw-r--r--src/core/network/network.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/network/network.cpp b/src/core/network/network.cpp
index 6571005d0..4669130ee 100644
--- a/src/core/network/network.cpp
+++ b/src/core/network/network.cpp
@@ -363,8 +363,10 @@ NetworkInstance::~NetworkInstance() {
std::optional<IPv4Address> GetHostIPv4Address() {
const std::string& selected_network_interface = Settings::values.network_interface.GetValue();
const auto network_interfaces = Network::GetAvailableNetworkInterfaces();
- ASSERT_MSG(network_interfaces.size() > 0,
- "GetAvailableNetworkInterfaces returned no interfaces");
+ if (network_interfaces.size() == 0) {
+ LOG_ERROR(Network, "GetAvailableNetworkInterfaces returned no interfaces");
+ return {};
+ }
const auto res = std::ranges::find_if(network_interfaces,
[&selected_network_interface](const auto& interface) {