From 951a8ecb42744edc2096fa1c6ffe4222a103654f Mon Sep 17 00:00:00 2001 From: yejianwu Date: Mon, 19 Mar 2018 21:51:33 +0800 Subject: [PATCH] add nullptr check --- mace/ops/ops_test_util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mace/ops/ops_test_util.h b/mace/ops/ops_test_util.h index 72d97b3e..ece48857 100644 --- a/mace/ops/ops_test_util.h +++ b/mace/ops/ops_test_util.h @@ -394,6 +394,7 @@ void BufferToImage(OpsTestNet *net, const std::string &output_name, const kernels::BufferType type) { MACE_CHECK_NOTNULL(net); + OpDefBuilder("BufferToImage", "BufferToImageTest") .Input(input_name) .Output(output_name) @@ -412,6 +413,8 @@ void ImageToBuffer(OpsTestNet *net, const std::string &input_name, const std::string &output_name, const kernels::BufferType type) { + MACE_CHECK_NOTNULL(net); + OpDefBuilder("ImageToBuffer", "ImageToBufferTest") .Input(input_name) .Output(output_name) -- GitLab