1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 16:44:05 +02:00

Avoid possible null pointer access

This commit is contained in:
Jeff Mitchell
2012-06-20 21:47:10 -04:00
parent ed58392e04
commit 9ad3e053e7

View File

@@ -95,7 +95,8 @@ StreamConnection::~StreamConnection()
// protected, we could expose it:
//m_iodev->setErrorString("FTConnection providing data went away mid-transfer");
((BufferIODevice*)m_iodev.data())->inputComplete();
if ( !m_iodev.isNull() )
((BufferIODevice*)m_iodev.data())->inputComplete();
}
Servent::instance()->onStreamFinished( this );