Fix two more clang static analysis warnings
This commit is contained in:
@@ -70,6 +70,7 @@ MidiBuffer::resize (size_t size)
|
||||
cache_aligned_malloc ((void**) &_data, size);
|
||||
|
||||
if (_size) {
|
||||
assert (old_data);
|
||||
memcpy (_data, old_data, _size);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ RTMidiBuffer::resize (size_t size)
|
||||
cache_aligned_malloc ((void**) &_data, size * sizeof (Item));
|
||||
|
||||
if (_size) {
|
||||
assert (old_data);
|
||||
memcpy (_data, old_data, _size * sizeof (Item));
|
||||
cache_aligned_free (old_data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user