check type of preview-play-handle via type() instead of blindly using dynamic_cast - probably fixes random crashes when previewing a lot of samples and presets

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@925 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-04-15 22:32:44 +00:00
parent 536b16088d
commit 53c79c5471
3 changed files with 22 additions and 5 deletions

View File

@@ -1,3 +1,19 @@
2008-04-15 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/gui/file_browser.cpp:
check type of preview-play-handle via type() instead of blindly using
dynamic_cast - probably fixes random crashes when previewing a lot of
samples and presets
* src/tracks/instrument_track.cpp:
delete instrument-instance *after* removing all play-handles from
mixer as several play-handle-methods rely on instrument - fixes crash
when removing track while playing
* src/core/track.cpp:
directly delete view before removing model - fixes crash when
removing instrument-track with instrument-track-window open
2008-04-15 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/stereo_matrix/stereomatrix_control_dialog.cpp:

View File

@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
AC_INIT(lmms, 0.4.0-svn20080409, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080409)
AC_INIT(lmms, 0.4.0-svn20080415, lmms-devel/at/lists/dot/sf/dot/net)
AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080415)
AM_CONFIG_HEADER(config.h)

View File

@@ -536,10 +536,11 @@ void listView::mouseReleaseEvent( QMouseEvent * _me )
{
// if there're samples shorter than 3 seconds, we don't
// stop them if the user releases mouse-button...
samplePlayHandle * s = dynamic_cast<samplePlayHandle *>(
m_previewPlayHandle );
if( s != NULL )
if( m_previewPlayHandle->type() ==
playHandle::SamplePlayHandle )
{
samplePlayHandle * s = dynamic_cast<samplePlayHandle *>(
m_previewPlayHandle );
if( s->totalFrames() - s->framesDone() <=
static_cast<f_cnt_t>(
engine::getMixer()->sampleRate() * 3 ) )