From 3794d94b68cb51e01b31b9a0935ff41bdaeafb7f Mon Sep 17 00:00:00 2001 From: Thomas Harte <thomas.harte@gmail.com> Date: Sun, 27 Oct 2019 14:09:02 -0400 Subject: [PATCH] Adds a sanity check on alignment. --- Outputs/OpenGL/ScanTarget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Outputs/OpenGL/ScanTarget.cpp b/Outputs/OpenGL/ScanTarget.cpp index 08e1d4fbc..85fa3fe0f 100644 --- a/Outputs/OpenGL/ScanTarget.cpp +++ b/Outputs/OpenGL/ScanTarget.cpp @@ -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;