small code cleanup for CastSink

This commit is contained in:
rafael@riseup.net 2013-05-18 19:25:20 +00:00
parent 3fbfd0f03d
commit 9753bb3478
1 changed files with 4 additions and 5 deletions

View File

@ -290,12 +290,11 @@ class CastSink : public Sink, public virtual Reporter
inline virtual bool inline virtual bool
isOpen ( void ) const throw () isOpen ( void ) const throw ()
{ {
Sink *s = getSink(); if( !getSink() ) {
if (s)
return getSink()->isOpen();
else
return false; return false;
} }
return getSink()->isOpen();
}
/** /**
* Check if the CastSink is ready to accept data. * Check if the CastSink is ready to accept data.