From 72bd13a8ed385c019978432e692110e5960ba988 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 6 Oct 2023 05:30:32 +0200 Subject: [PATCH] Phase 2 (make qt_settingsnetwork.cpp filter out the Internal option for machines that do not have an internal NIC - currently that is all machines). --- src/qt/qt_settingsnetwork.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/qt/qt_settingsnetwork.cpp b/src/qt/qt_settingsnetwork.cpp index d4d58de64..9d0a2eabd 100644 --- a/src/qt/qt_settingsnetwork.cpp +++ b/src/qt/qt_settingsnetwork.cpp @@ -115,6 +115,12 @@ SettingsNetwork::onCurrentMachineChanged(int machineId) selectedRow = 0; while (true) { + /* Skip "internal" if machine doesn't have it. */ + if ((c == 1) && (machine_has_flags(machineId, MACHINE_NIC) == 0)) { + c++; + continue; + } + auto name = DeviceConfig::DeviceName(network_card_getdevice(c), network_card_get_internal_name(c), 1); if (name.isEmpty()) { break;