From 084e41af10452ca0a588d227f71a0c8f1f27f3e4 Mon Sep 17 00:00:00 2001 From: Damian Minkov <damencho@jitsi.org> Date: Mon, 5 Nov 2012 16:14:05 +0000 Subject: [PATCH] Adds hotplug to portaudio wmme host api, also fixes a NPE that can prevent device change updates. --- src/org/jitsi/impl/neomedia/device/PortAudioSystem.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/jitsi/impl/neomedia/device/PortAudioSystem.java b/src/org/jitsi/impl/neomedia/device/PortAudioSystem.java index 32a14200..cdf199e9 100644 --- a/src/org/jitsi/impl/neomedia/device/PortAudioSystem.java +++ b/src/org/jitsi/impl/neomedia/device/PortAudioSystem.java @@ -129,7 +129,10 @@ protected void doInitialize() // otherwise a call currently using this device will fail. for(int i = 0; devices !=null && i < devices.size() && !found; ++i) { - if(devices.get(i).getUID().equals(deviceUID)) + // using identifier (name or uid, cause there can be some + // uid that are null) + String id = devices.get(i).getIdentifier(); + if(id.equals(deviceUID) || id.equals(name)) { cdi = devices.get(i); found = true; -- GitLab