From b1462719b9bbcde602d0691249118edf7195493e Mon Sep 17 00:00:00 2001 From: Javier Serrano Polo Date: Fri, 18 Aug 2006 21:19:16 +0000 Subject: [PATCH] check user waveform presence, fixes organic segfault git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@349 0778d3d1-df1d-0410-868b-ea421aaaa00d --- src/lib/oscillator.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib/oscillator.cpp b/src/lib/oscillator.cpp index 9d99cb924..b41b75883 100644 --- a/src/lib/oscillator.cpp +++ b/src/lib/oscillator.cpp @@ -55,7 +55,10 @@ oscillator::oscillator( const waveShapes * _wave_shape, void oscillator::update( sampleFrame * _ab, const fpab_t _frames, const ch_cnt_t _chnl ) { - m_userWave->lock(); + if( m_userWave ) + { + m_userWave->lock(); + } if( m_subOsc != NULL ) { @@ -82,7 +85,10 @@ void oscillator::update( sampleFrame * _ab, const fpab_t _frames, updateNoSub( _ab, _frames, _chnl ); } - m_userWave->unlock(); + if( m_userWave ) + { + m_userWave->unlock(); + } }