diff options
| -rw-r--r-- | src/qmmp/soundcore.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qmmp/soundcore.cpp b/src/qmmp/soundcore.cpp index 0b51adb15..c8881a9e1 100644 --- a/src/qmmp/soundcore.cpp +++ b/src/qmmp/soundcore.cpp @@ -228,9 +228,12 @@ QString SoundCore::metaData(Qmmp::MetaData key) bool SoundCore::decode() { qDebug("ready"); - if(!m_inputSource->ioDevice()->isOpen()) - m_inputSource->ioDevice()->open(QIODevice::ReadOnly); - disconnect(m_inputSource->ioDevice(), SIGNAL(readyRead()), this, SLOT(decode())); + if(m_inputSource->ioDevice()) + { + if(!m_inputSource->ioDevice()->isOpen()) + m_inputSource->ioDevice()->open(QIODevice::ReadOnly); + disconnect(m_inputSource->ioDevice(), SIGNAL(readyRead()), this, SLOT(decode())); + } if(!m_engine) { |
