Package: hydrogen
Version: 0.9.3-4
Tags: patch

    Ubuntu hydrogen based on 0.9.3-4 could crash on load of certain
drumkit samples (including Millo_Multilayered2) where a sample was
missing.  This appears to be related to a use before set issue in
src/lib/Hydrogen.cpp.  The attached patch resolved the issue in
Ubuntu.  If the crash condition can be replicated in Debian, please
consider the attached patch to resolve the issue.

-- 
Emmet HIKORY
diff -Nur hydrogen-0.9.3/build-tree/hydrogen-0.9.3/src/lib/Hydrogen.cpp hydrogen-0.9.3.new/build-tree/hydrogen-0.9.3/src/lib/Hydrogen.cpp
--- hydrogen-0.9.3/src/lib/Hydrogen.cpp	2006-01-06 23:15:50.000000000 +0900
+++ hydrogen-0.9.3/src/lib/Hydrogen.cpp	2007-10-11 01:24:24.415338221 +0900
@@ -2492,8 +2492,7 @@
 	//				pSample->setFilename( pNewSample->getFilename() );	// riuso il path del nuovo sample (perche' e' gia relativo al path del drumkit)
 					if (pSample == NULL) {
 						errorLog( "[loadDrumkit] Error Loading drumkit: NULL sample, now using /emptySample.wav" );
-						pSample->m_sFilename = string(DataPath::getDataPath() ).append( "/emptySample.wav" );
-						pSample = Sample::load( pSample->m_sFilename );
+						pSample = Sample::load( string(DataPath::getDataPath() ).append( "/emptySample.wav" ));
 					}
 					InstrumentLayer *pLayer = new InstrumentLayer( pSample );
 					pLayer->m_fStartVelocity = pNewLayer->m_fStartVelocity;

Reply via email to