Sebastian Moors wrote:
hydrogen segfaults here (debian sid, jack 0.116.1) when the audio device is not available (for instance, running rhythmbox / alsa) while starting up hydrogen

Try the attached patch.

Thanks,
Gabriel


diff --git a/libs/hydrogen/src/IO/jack_output.cpp b/libs/hydrogen/src/IO/jack_output.cpp
index 33c1d42..1c36f9f 100644
--- a/libs/hydrogen/src/IO/jack_output.cpp
+++ b/libs/hydrogen/src/IO/jack_output.cpp
@@ -521,6 +521,10 @@ int JackOutput::init( unsigned /*nBufferSize*/ )
 		}
 	}
 
+	if (client == 0) {
+	    return -1;
+	}
+
 	// Here, client should either be valid, or NULL.	
 	jack_server_sampleRate = jack_get_sample_rate ( client );
 	jack_server_bufferSize = jack_get_buffer_size ( client );
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to