1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-25 16:31:42 +00:00

Adds a sanity check on alignment.

This commit is contained in:
Thomas Harte 2019-10-27 14:09:02 -04:00
parent d4077afd30
commit 3794d94b68

View File

@ -174,6 +174,8 @@ void ScanTarget::end_scan() {
}
uint8_t *ScanTarget::begin_data(size_t required_length, size_t required_alignment) {
assert(required_alignment);
if(allocation_has_failed_) return nullptr;
if(!write_area_texture_.size()) {
allocation_has_failed_ = true;