Improve handling of possible NPE in the iOS script

This doesn't actually fix anything - but does ensure it would fail at
the right point, rather than imploding unpredictably later on.
This commit is contained in:
Tim Perry
2026-09-08 15:16:30 +02:00
parent 5d3553a30a
commit 18b532e6c8
+1 -1
View File
@@ -26,7 +26,7 @@ waitForModule('libnetwork.dylib', (libnetwork) => {
// This is the method to make a new endpoint to connect to:
// https://developer.apple.com/documentation/network/2976720-nw_endpoint_create_host (iOS 12+)
const nw_endpoint_create_host = new NativeFunction(
libnetwork.findExportByName('nw_endpoint_create_host'),
libnetwork.getExportByName('nw_endpoint_create_host'),
'pointer', ['pointer', 'pointer']
);