QNetworkInformation[win]: Capture another potential exception
As reported by a user. Fixes: QTBUG-108382 Pick-to: 6.4 Change-Id: Ic94c65d533edd84c8fda5d713d9579a9492b88ae Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
64bb83f882
commit
da0587c43a
@ -243,7 +243,12 @@ QNetworkInformation::TransportMedium getTransportMedium(const ConnectionProfile
|
||||
void QNetworkListManagerEvents::emitWinRTUpdates()
|
||||
{
|
||||
using namespace winrt::Windows::Networking::Connectivity;
|
||||
ConnectionProfile profile = NetworkInformation::GetInternetConnectionProfile();
|
||||
ConnectionProfile profile = nullptr;
|
||||
try {
|
||||
profile = NetworkInformation::GetInternetConnectionProfile();
|
||||
} catch (...) {
|
||||
// pass, we would just return early if we get an empty object back anyway
|
||||
}
|
||||
if (profile == nullptr)
|
||||
return;
|
||||
emit transportMediumChanged(getTransportMedium(profile));
|
||||
|
Loading…
Reference in New Issue
Block a user