OS-X-Voodoo-PS2-Controller
OS-X-Voodoo-PS2-Controller copied to clipboard
Fix rare panic during ApplePS2Controller initialization
ApplePS2Controller's IOService publication/termination notification handler calls into the controller's workloop, but the handler was being registered before the workloop and associated command gate were created. There was a short window between registering the handler and creating the workloop and command gate where receiving a notification would dereference a NULL command gate pointer.
Move the addMatchingNotification calls to after the workloop and gate are created to prevent this.