From 8d2002f4ed923703ceafa20a9aa790bb3f083986 Mon Sep 17 00:00:00 2001 From: Andrew Madsen Date: Fri, 6 Nov 2015 15:47:20 -0700 Subject: [PATCH] Issue #106: Fixed exception thrown by MIKMIDIConnectionManager when unplugging virtual MIDI device. --- Source/MIKMIDIConnectionManager.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/MIKMIDIConnectionManager.m b/Source/MIKMIDIConnectionManager.m index c8449bf5..6f85ec12 100644 --- a/Source/MIKMIDIConnectionManager.m +++ b/Source/MIKMIDIConnectionManager.m @@ -358,7 +358,7 @@ - (NSString *)deviceNameFromVirtualEndpoint:(MIKMIDIEndpoint *)endpoint - (MIKMIDIDevice *)deviceContainingEndpoint:(MIKMIDIEndpoint *)endpoint { if (!endpoint) return nil; - NSMutableSet *devices = [self.availableDevices mutableCopy]; + NSMutableSet *devices = [NSMutableSet setWithArray:self.availableDevices]; [devices unionSet:self.connectedDevices]; for (MIKMIDIDevice *device in devices) { NSMutableSet *deviceEndpoints = [NSMutableSet setWithArray:[device.entities valueForKeyPath:@"@distinctUnionOfArrays.sources"]];