diff --git a/src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp b/src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp index 00c783277d..710f0ccc64 100644 --- a/src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp +++ b/src/kits/network/libnetapi/UrlProtocolAsynchronousListener.cpp @@ -103,6 +103,10 @@ BUrlProtocolAsynchronousListener::MessageReceived(BMessage* message) message->FindMessage("url:result", &archive); BUrlResult* result = dynamic_cast( instantiate_object(&archive)); + if (result == NULL) { + debugger("Failed to unarchive BUrlResult"); + result = new BUrlResult(); + } HeadersReceived(caller, *result); delete result; }