aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/midi.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-08-24 22:13:49 +0200
committercbdev <cb@cbcdn.com>2019-08-24 22:13:49 +0200
commitba8cb9bfaf0c3699a728cef6918d7433a8690936 (patch)
tree50385602746213b49b2ec0db0ace0cbd325f7e88 /backends/midi.c
parent0906c00d23be220928a656476c26a490998e826e (diff)
downloadmidimonster-ba8cb9bfaf0c3699a728cef6918d7433a8690936.tar.gz
midimonster-ba8cb9bfaf0c3699a728cef6918d7433a8690936.tar.bz2
midimonster-ba8cb9bfaf0c3699a728cef6918d7433a8690936.zip
Fix NULL pointer access
Diffstat (limited to 'backends/midi.c')
-rw-r--r--backends/midi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/backends/midi.c b/backends/midi.c
index 88b841c..571a61d 100644
--- a/backends/midi.c
+++ b/backends/midi.c
@@ -362,7 +362,7 @@ static int midi_start(){
fprintf(stderr, "MIDI client ID is %d\n", snd_seq_client_id(sequencer));
//update the sequencer client name
- if(snd_seq_set_client_name(sequencer, sequencer_name) < 0){
+ if(snd_seq_set_client_name(sequencer, sequencer_name ? sequencer_name : "MIDIMonster") < 0){
fprintf(stderr, "Failed to set MIDI client name to %s\n", sequencer_name);
return 1;
}