diff options
author | Henri Herscher <henri@oreka.org> | 2007-11-02 20:53:09 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2007-11-02 20:53:09 +0000 |
commit | 09c14de14f45d448da90f5dbcec4836e0a9c3585 (patch) | |
tree | 0ee0e645c450961df1ec528639ae1a86be111458 | |
parent | 20f9b494b7d6fd24ee01a9611d990379d7add775 (diff) |
Fixed potential null pointer crash that was introduced at rev. 500.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@502 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r-- | orkbasecxx/CapturePort.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/orkbasecxx/CapturePort.cpp b/orkbasecxx/CapturePort.cpp index 751840c..46faff2 100644 --- a/orkbasecxx/CapturePort.cpp +++ b/orkbasecxx/CapturePort.cpp @@ -268,9 +268,19 @@ void CapturePort::AddCaptureEvent(CaptureEventRef eventRef) bool CapturePort::IsExpired(time_t now) { - if((now - m_lastUpdated) > (10*60) && m_audioTapeRef->m_state != AudioTape::StateActive) // 10 minutes + if((now - m_lastUpdated) > (10*60)) // 10 minutes { - return true; + if(m_audioTapeRef.get()) + { + if(m_audioTapeRef->m_state != AudioTape::StateActive) + { + return true; + } + } + else + { + return true; + } } return false; } |