bluetooth: there may be no active local device
Which leads again to a NULL dereference. Change-Id: I6da9d7cc59de8b75aaacaa5103a762a7b929b675 Reviewed-on: https://review.haiku-os.org/c/haiku/+/11264 Haiku-Format: Haiku-format Bot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
364a11897d
commit
42b8b3c5b7
@@ -42,10 +42,13 @@ RemoteDevice::IsTrustedDevice(void)
|
||||
BObjectList<RemoteDevice>
|
||||
RemoteDevice::GetRemoteDevices(LocalDevice* localDevice)
|
||||
{
|
||||
BMessage requestRemoteDevices(BT_MSG_GET_REMOTE_DEVICES);
|
||||
BObjectList<RemoteDevice> rdList;
|
||||
|
||||
if (localDevice == NULL)
|
||||
return rdList;
|
||||
|
||||
BMessage devices;
|
||||
BMessage requestRemoteDevices(BT_MSG_GET_REMOTE_DEVICES);
|
||||
requestRemoteDevices.AddInt32("hci_id", localDevice->ID());
|
||||
if (BMessenger(BLUETOOTH_SIGNATURE).SendMessage(&requestRemoteDevices,
|
||||
&devices) != B_OK)
|
||||
|
||||
Reference in New Issue
Block a user