diff options
author | samr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109> | 2009-07-01 09:00:04 +0000 |
---|---|---|
committer | samr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109> | 2009-07-01 09:00:04 +0000 |
commit | acfa8e01a93bc5746ef80078b0f6f1b423daecd7 (patch) | |
tree | 846e6e6bc4e4adbc2cbf1c633ff4436d311f3b2c | |
parent | 6ae2851a17574a683095ba63bb4f3f36a9713465 (diff) | |
download | nohands-acfa8e01a93bc5746ef80078b0f6f1b423daecd7.tar.gz |
Avoid crashing if Speex is not present.
git-svn-id: http://nohands.svn.sourceforge.net/svnroot/nohands/trunk@86 126591fb-c623-4b62-a76d-97a8e4f34109
-rw-r--r-- | qt/hfstandalone.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/qt/hfstandalone.cpp b/qt/hfstandalone.cpp index 403aa67..503e8ac 100644 --- a/qt/hfstandalone.cpp +++ b/qt/hfstandalone.cpp @@ -796,9 +796,10 @@ public: m_sound->SetJitterWindowHint(10); m_sigproc = SoundIoFltCreateSpeex(&g_qt_ei); - m_sigproc->Configure(m_sigproc_props); - - m_sound->SetDsp(m_sigproc); + if (m_sigproc) { + m_sigproc->Configure(m_sigproc_props); + m_sound->SetDsp(m_sigproc); + } m_sound_user = SC_NONE; return true; @@ -1082,7 +1083,8 @@ public slots: if (m_sound_user != SC_NONE) SoundCardRelease(); - if (!m_sigproc->Configure(m_sigproc_props)) { + if (m_sigproc && + !m_sigproc->Configure(m_sigproc_props)) { fprintf(stderr, "%s: sigproc failed\n", __FUNCTION__); return; } |