Windows Bluetooth: gracefully handle device disconnect during detailed service discovery


Discovering service details in an asynchronous process, which means
that the user may actually disconnect from the device while the
discovery is still in progress.

This means that we could end up in a situation when the
discoverServiceDetailsHelper() is called with an empty serviceList.
In this case, requesting for a specific service from the serviceList
returns a nullptr, which may later lead to a crash. Add a nullptr
check to gracefully handle such situations.

Fixes: QTBUG-119060
Pick-to: 6.7 6.6 6.5
Change-Id: Iebdff67a12e6550979535ae5bac659ddae57b010
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
commit35f853837793b6d526815140021013cf03cc80b5
parent8a1ed56a26324565506a2a73a4e6d81dd237974d
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeFri, 15 Dec 2023 11:46:11 +0100