OS-X-Voodoo-PS2-Controller icon indicating copy to clipboard operation
OS-X-Voodoo-PS2-Controller copied to clipboard

Fix rare panic during ApplePS2Controller initialization

Open Fraxul opened this issue 5 years ago • 0 comments

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.

Fraxul avatar Jun 02 '19 20:06 Fraxul