diff --git a/src/kits/network/libnetapi/UrlProtocolRoster.cpp b/src/kits/network/libnetapi/UrlProtocolRoster.cpp index c023c9baad..33889ead08 100644 --- a/src/kits/network/libnetapi/UrlProtocolRoster.cpp +++ b/src/kits/network/libnetapi/UrlProtocolRoster.cpp @@ -17,10 +17,16 @@ #include +static BUrlContext gDefaultContext; + + /* static */ BUrlRequest* BUrlProtocolRoster::MakeRequest(const BUrl& url, BUrlProtocolListener* listener, BUrlContext* context) { + if(context == NULL) + context = &gDefaultContext; + // TODO: instanciate the correct BUrlProtocol using add-on interface if (url.Protocol() == "http") { return new(std::nothrow) BHttpRequest(url, false, "HTTP", listener,