fix missmatched deletes in spectrum painter (#1121)

This commit is contained in:
E.T 2023-06-07 15:41:30 +02:00 committed by GitHub
parent 5a5445e980
commit 496b124baf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -234,14 +234,14 @@ std::vector<uint8_t> SpectrumInputImageView::get_line(uint16_t y) {
grey_buffer[px] = color.to_greyscale();
}
delete buffer;
delete[] buffer;
std::vector<uint8_t> values(width);
for (int i = 0; i < width; i++) {
values[i] = grey_buffer[i];
}
delete grey_buffer;
delete[] grey_buffer;
return values;
}