Skip to content

Commit

Permalink
Re-added NULL check for the proper variable
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Sep 28, 2013
1 parent 8b07e78 commit d570901
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions native_midi/native_midi_common.c
Expand Up @@ -231,6 +231,9 @@ static MIDIEvent *MIDItoStream(MIDIFile *mididata)

track = (MIDIEvent**) calloc(1, sizeof(MIDIEvent*) * mididata->nTracks);

if (NULL == track)
return NULL;

/* First, convert all tracks to MIDIEvent lists */
for (trackID = 0; trackID < mididata->nTracks; trackID++)
track[trackID] = MIDITracktoStream(&mididata->track[trackID]);
Expand Down

0 comments on commit d570901

Please sign in to comment.