From 48c1a2428414761d5f461d8fa2cbbc7b1143deca Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 26 Jan 2018 13:56:19 +0100 Subject: Fix some clang warnings (argument with 'nonnull' attribute passed null) --- libs/evoral/src/SMF.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'libs/evoral') diff --git a/libs/evoral/src/SMF.cpp b/libs/evoral/src/SMF.cpp index b5d34aa538..60d69c8a4d 100644 --- a/libs/evoral/src/SMF.cpp +++ b/libs/evoral/src/SMF.cpp @@ -326,6 +326,7 @@ SMF::read_event(uint32_t* delta_t, uint32_t* size, uint8_t** buf, event_id_t* no if (*size < (unsigned)event_size) { *buf = (uint8_t*)realloc(*buf, event_size); } + assert (*buf); memcpy(*buf, event->midi_buffer, size_t(event_size)); *size = event_size; if (((*buf)[0] & 0xF0) == 0x90 && (*buf)[2] == 0) { -- cgit v1.2.3