http_streamer: improve IsRunning() safeness

This commit is contained in:
Dario Casalinuovo
2016-10-23 03:30:27 +02:00
parent 3798bf90cb
commit e42135e574
@@ -195,11 +195,12 @@ HTTPMediaIO::Open()
bool
HTTPMediaIO::IsRunning() const
{
BHttpRequest* httpReq = dynamic_cast<BHttpRequest*>(fReq);
if (httpReq != NULL)
if (fListener != NULL)
return fListener->IsRunning();
else
else if (fReq != NULL)
return fReq->IsRunning();
return false;
}