summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocket_winrt.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2017-08-07 08:16:45 +0200
committerAlex Blasche <alexander.blasche@qt.io>2017-08-07 08:17:26 +0200
commitc3c3837b02919a26031d917003898e72585e300b (patch)
tree02d2166f1e896327efd8a97df3455fd8359fa2be /src/bluetooth/qbluetoothsocket_winrt.cpp
parentaeeae7bc92f19778a73fb10a09b8949b2c384d39 (diff)
parent687ec9eb370e9538264280b58bed4d3b1c889579 (diff)
Merge remote-tracking branch 'gerrit/5.9' into dev
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_winrt.cpp')
-rw-r--r--src/bluetooth/qbluetoothsocket_winrt.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothsocket_winrt.cpp b/src/bluetooth/qbluetoothsocket_winrt.cpp
index 4e2bc11c..365fe046 100644
--- a/src/bluetooth/qbluetoothsocket_winrt.cpp
+++ b/src/bluetooth/qbluetoothsocket_winrt.cpp
@@ -422,6 +422,9 @@ QString QBluetoothSocketPrivate::localName() const
QBluetoothAddress QBluetoothSocketPrivate::localAddress() const
{
+ if (!m_socketObject)
+ return QBluetoothAddress();
+
HRESULT hr;
ComPtr<IStreamSocketInformation> info;
hr = m_socketObject->get_Information(&info);
@@ -437,6 +440,9 @@ QBluetoothAddress QBluetoothSocketPrivate::localAddress() const
quint16 QBluetoothSocketPrivate::localPort() const
{
+ if (!m_socketObject)
+ return 0;
+
HRESULT hr;
ComPtr<IStreamSocketInformation> info;
hr = m_socketObject->get_Information(&info);
@@ -449,6 +455,9 @@ quint16 QBluetoothSocketPrivate::localPort() const
QString QBluetoothSocketPrivate::peerName() const
{
+ if (!m_socketObject)
+ return QString();
+
HRESULT hr;
ComPtr<IStreamSocketInformation> info;
hr = m_socketObject->get_Information(&info);
@@ -464,6 +473,9 @@ QString QBluetoothSocketPrivate::peerName() const
QBluetoothAddress QBluetoothSocketPrivate::peerAddress() const
{
+ if (!m_socketObject)
+ return QBluetoothAddress();
+
HRESULT hr;
ComPtr<IStreamSocketInformation> info;
hr = m_socketObject->get_Information(&info);
@@ -479,6 +491,9 @@ QBluetoothAddress QBluetoothSocketPrivate::peerAddress() const
quint16 QBluetoothSocketPrivate::peerPort() const
{
+ if (!m_socketObject)
+ return 0;
+
HRESULT hr;
ComPtr<IStreamSocketInformation> info;
hr = m_socketObject->get_Information(&info);