From c40562d4467e3a68b0dac5e865570c8f38d1487e Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 22 Feb 2021 23:54:40 +0000 Subject: Avoid nullptr dereference of vector_sum_col Signed-off-by: Georgios Pinitas Change-Id: I4cc002da82da2219f3909a4e34463946cde4cf65 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5155 Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp b/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp index eba52b08bd..d39900a561 100644 --- a/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp +++ b/src/core/CL/kernels/CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel.cpp @@ -406,7 +406,7 @@ void CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::configure(const CLCompileCon kernel_name += "_fused_output_stage_fixedpoint"; _fuse_output_stage = true; // If a_offset == 0, vector_sum_col can be a nullptr - if(a_offset != 0) + if(a_offset != 0 && vector_sum_col != nullptr) { build_opts.add_option("-DA_OFFSET=" + support::cpp11::to_string(a_offset)); build_opts.add_option_if(vector_sum_col->info()->tensor_shape().num_dimensions() > 1, "-DSUM_COL_HAS_BATCHES"); -- cgit v1.2.1