Libnetapi: fix abortion of file requests.

* We didn't wait for the thread to terminate, so the thread could use
the object after deletion.
This commit is contained in:
Adrien Destugues 2014-09-04 11:29:40 +02:00
parent 0d50f6af5b
commit 6e38076e81

View File

@ -29,6 +29,9 @@ BFileRequest::BFileRequest(const BUrl& url, BUrlProtocolListener* listener,
BFileRequest::~BFileRequest()
{
status_t status = Stop();
if (status == B_OK)
wait_for_thread(fThreadId, &status);
}