Fixes https://github.com/libsdl-org/SDL/issues/5133
@@ -141,6 +141,9 @@ public class HIDDeviceManager {
private void initializeUSB() {
mUsbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE);
+ if (mUsbManager == null) {
+ return;
+ }
/*
// Logging