mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-04 21:27:58 +02:00
* Don't crash in StreamConnection without m_iodev.
This commit is contained in:
@@ -230,11 +230,14 @@ StreamConnection::handleMsg( msg_ptr msg )
|
|||||||
// << "payload len" << msg->payload().length()
|
// << "payload len" << msg->payload().length()
|
||||||
// << "written to device so far: " << m_badded;
|
// << "written to device so far: " << m_badded;
|
||||||
|
|
||||||
if ( ((BufferIODevice*)m_iodev.data())->nextEmptyBlock() < 0 )
|
if ( !m_iodev || ( (BufferIODevice*)m_iodev.data() )->nextEmptyBlock() < 0 )
|
||||||
{
|
{
|
||||||
m_allok = true;
|
m_allok = true;
|
||||||
|
|
||||||
// tell our iodev there is no more data to read, no args meaning a success:
|
// tell our iodev there is no more data to read, no args meaning a success:
|
||||||
|
if ( m_iodev )
|
||||||
( (BufferIODevice*)m_iodev.data() )->inputComplete();
|
( (BufferIODevice*)m_iodev.data() )->inputComplete();
|
||||||
|
|
||||||
shutdown();
|
shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user