Skip to content

Commit

Permalink
Check for nullptr in BufferManager::release
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-w committed Feb 12, 2017
1 parent 4254597 commit e6b5712
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/core/BufferManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ void BufferManager::clear( surroundSampleFrame * ab, const f_cnt_t frames,

void BufferManager::release( sampleFrame * buf )
{
if (buf == nullptr) return;
int i = s_releasedIndex.fetchAndAddOrdered( 1 );
s_released[ i ] = buf;
//qDebug( "released buffer: %p - index %d", buf, i );
Expand Down
2 changes: 1 addition & 1 deletion src/core/PlayHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ void PlayHandle::doProcessing()

void PlayHandle::releaseBuffer()
{
if( m_playHandleBuffer ) BufferManager::release( m_playHandleBuffer );
BufferManager::release( m_playHandleBuffer );
m_playHandleBuffer = NULL;
}

0 comments on commit e6b5712

Please sign in to comment.