[haiku-commits] haiku: hrev50616 - src/add-ons/media/plugins/http_streamer

  • From: b.vitruvio@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 23 Oct 2016 03:36:50 +0200 (CEST)

hrev50616 adds 1 changeset to branch 'master'
old head: 3798bf90cb8e5e55b3b5ec15f22dbc0dd0735fd0
new head: e42135e57435bf3eb55770d68a31fb9db76eb1d2
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=e42135e57435+%5E3798bf90cb8e

----------------------------------------------------------------------------

e42135e57435: http_streamer: improve IsRunning() safeness

                                [ Dario Casalinuovo <b.vitruvio@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev50616
Commit:      e42135e57435bf3eb55770d68a31fb9db76eb1d2
URL:         http://cgit.haiku-os.org/haiku/commit/?id=e42135e57435
Author:      Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
Date:        Sun Oct 23 01:25:41 2016 UTC

----------------------------------------------------------------------------

1 file changed, 4 insertions(+), 3 deletions(-)
src/add-ons/media/plugins/http_streamer/HTTPMediaIO.cpp | 7 ++++---

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/http_streamer/HTTPMediaIO.cpp 
b/src/add-ons/media/plugins/http_streamer/HTTPMediaIO.cpp
index e672f9b..bc9df16 100644
--- a/src/add-ons/media/plugins/http_streamer/HTTPMediaIO.cpp
+++ b/src/add-ons/media/plugins/http_streamer/HTTPMediaIO.cpp
@@ -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;
 }
 
 


Other related posts:

  • » [haiku-commits] haiku: hrev50616 - src/add-ons/media/plugins/http_streamer - b . vitruvio