if adding play handle failed for some reason, set internal pointer to it to NULL

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1700 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-09-23 10:49:01 +00:00
parent 5c7e07de06
commit 3b49f27c4e
2 changed files with 23 additions and 2 deletions

View File

@@ -1,3 +1,21 @@
2008-09-23 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/gui/file_browser.cpp:
if adding play handle failed for some reason, set internal pointer to
it to NULL
* include/play_handle.h:
made QThread pointer const
* include/mixer.h:
* src/core/mixer.cpp:
- lock playHandle mutex in mixer::clear()
- moved implementation of mixer::removePlayHandle() from header to
source-file
- only delete play-handle in mixer::removePlayHandle() if it was
found in playHandle vector (fixes crash when previewing a preset
under high load)
2008-09-22 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* CMakeLists.txt:

View File

@@ -292,8 +292,11 @@ void listView::mousePressEvent( QMouseEvent * _me )
}
if( m_previewPlayHandle != NULL )
{
engine::getMixer()->addPlayHandle(
m_previewPlayHandle );
if( !engine::getMixer()->addPlayHandle(
m_previewPlayHandle ) )
{
m_previewPlayHandle = NULL;
}
}
m_pphMutex.unlock();
}