1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a possible nullptr dereference in the Android runtime permission code

This commit is contained in:
hogliux 2017-02-09 17:43:41 +00:00
parent ebbba641a4
commit c1f7b6dc16
2 changed files with 10 additions and 2 deletions

View file

@ -1196,7 +1196,13 @@ void AudioDeviceSelectorComponent::updateAllControls()
void AudioDeviceSelectorComponent::buttonClicked (Button* btn)
{
if (bluetoothButton == btn)
BluetoothMidiDevicePairingDialogue::open();
{
if (! RuntimePermissions::isGranted (RuntimePermissions::bluetoothMidi))
RuntimePermissions::request (RuntimePermissions::bluetoothMidi, nullptr);
if (RuntimePermissions::isGranted (RuntimePermissions::bluetoothMidi))
BluetoothMidiDevicePairingDialogue::open();
}
}
ListBox* AudioDeviceSelectorComponent::getMidiInputSelectorListBox() const noexcept