Cocoa: Fix segfault querying joystick elements

It is reportedly possible for IOHIDDeviceCopyMatchingElements to return
NULL on macOS 13 if the application lacks input monitoring permissions.

This commit only prevents the segfault.  More work will be needed to
correctly handle this situation, including Game Controller support.

Related to #2320
Closes #2321
This commit is contained in:
Camilla Löwy
2023-12-12 17:38:52 +01:00
parent ea3ea62708
commit 2c1d31009f
3 changed files with 11 additions and 3 deletions

View File

@@ -85,6 +85,7 @@ video tutorials.
- Andrew Gutekanst
- Stephen Gutekanst
- Jonathan Hale
- Daniel Hauser
- hdf89shfdfs
- Moritz Heinemann
- Sylvain Hellegouarch