mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 02:52:30 +02:00
windows: fix handle leak when using continuous scan
This commit is contained in:
parent
405d2e28ad
commit
1ada68aecd
@ -476,6 +476,7 @@ bool WiimoteScannerWindows::IsReady() const
|
|||||||
|
|
||||||
if (nullptr != hFindRadio)
|
if (nullptr != hFindRadio)
|
||||||
{
|
{
|
||||||
|
CloseHandle(hRadio);
|
||||||
pBluetoothFindRadioClose(hFindRadio);
|
pBluetoothFindRadioClose(hFindRadio);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -897,6 +898,7 @@ void ProcessWiimotes(bool new_scan, const T& callback)
|
|||||||
|
|
||||||
if (false == pBluetoothFindNextRadio(hFindRadio, &hRadio))
|
if (false == pBluetoothFindNextRadio(hFindRadio, &hRadio))
|
||||||
{
|
{
|
||||||
|
CloseHandle(hRadio);
|
||||||
pBluetoothFindRadioClose(hFindRadio);
|
pBluetoothFindRadioClose(hFindRadio);
|
||||||
hFindRadio = nullptr;
|
hFindRadio = nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user