diff --git a/kleidicv/src/arithmetics/sum_neon.cpp b/kleidicv/src/arithmetics/sum_neon.cpp index f9cbd27574f171e6720ae2eb07c9eca0b671cd91..9021d0bac0ae2bdbe9b502f594ab99b33cc2b187 100644 --- a/kleidicv/src/arithmetics/sum_neon.cpp +++ b/kleidicv/src/arithmetics/sum_neon.cpp @@ -28,11 +28,9 @@ class Sum final : public UnrollTwice { template kleidicv_error_t sum(const ScalarType *src, size_t src_stride, size_t width, size_t height, ScalarType *sum) { + CHECK_POINTERS(sum); CHECK_POINTER_AND_STRIDE(src, src_stride, height); CHECK_IMAGE_SIZE(width, height); - if (sum == nullptr) { - return KLEIDICV_ERROR_NULL_POINTER; - } Rectangle rect{width, height}; Rows src_rows{src, src_stride};