package kit: add a NULL check on requests

This avoid crashing on malformed repository URL (like missing http://).
This commit is contained in:
François Revol 2018-10-08 00:56:11 +02:00
parent 15fed7905d
commit 4a3dae2bac

View File

@ -90,6 +90,9 @@ FetchFileJob::Execute()
BUrlRequest* request = BUrlProtocolRoster::MakeRequest(fFileURL.String(),
this);
if (request == NULL)
return B_BAD_VALUE;
thread_id thread = request->Run();
wait_for_thread(thread, NULL);