From ba8cb9bfaf0c3699a728cef6918d7433a8690936 Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 24 Aug 2019 22:13:49 +0200 Subject: Fix NULL pointer access --- backends/midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3