diff --git a/lime/_backend/native/NativeHTTPRequest.hx b/lime/_backend/native/NativeHTTPRequest.hx index aceeae4b9..cccdc9dd0 100644 --- a/lime/_backend/native/NativeHTTPRequest.hx +++ b/lime/_backend/native/NativeHTTPRequest.hx @@ -112,6 +112,13 @@ class NativeHTTPRequest { private function doWork_loadURL (uri:String, binary:Bool):Void { + if (uri == null) { + + threadPool.sendError ({ instance: this, promise: promise, error: "The URI must not be null" }); + return; + + } + bytes = Bytes.alloc (0); bytesLoaded = 0; @@ -496,4 +503,4 @@ class NativeHTTPRequest { } -} \ No newline at end of file +}