aboutsummaryrefslogtreecommitdiff
path: root/source/rotate_argb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'source/rotate_argb.cc')
-rw-r--r--source/rotate_argb.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/rotate_argb.cc b/source/rotate_argb.cc
index 034d53e8..d55fac4f 100644
--- a/source/rotate_argb.cc
+++ b/source/rotate_argb.cc
@@ -120,7 +120,6 @@ static int ARGBRotate180(const uint8_t* src_argb,
int width,
int height) {
// Swap first and last row and mirror the content. Uses a temporary row.
- align_buffer_64(row, width * 4);
const uint8_t* src_bot = src_argb + src_stride_argb * (height - 1);
uint8_t* dst_bot = dst_argb + dst_stride_argb * (height - 1);
int half_height = (height + 1) >> 1;
@@ -129,6 +128,9 @@ static int ARGBRotate180(const uint8_t* src_argb,
ARGBMirrorRow_C;
void (*CopyRow)(const uint8_t* src_argb, uint8_t* dst_argb, int width) =
CopyRow_C;
+ align_buffer_64(row, width * 4);
+ if (!row)
+ return 1;
#if defined(HAS_ARGBMIRRORROW_NEON)
if (TestCpuFlag(kCpuHasNEON)) {
ARGBMirrorRow = ARGBMirrorRow_Any_NEON;