提交 951a8ecb 编写于 作者: Y yejianwu

add nullptr check

上级 2944863e
...@@ -394,6 +394,7 @@ void BufferToImage(OpsTestNet *net, ...@@ -394,6 +394,7 @@ void BufferToImage(OpsTestNet *net,
const std::string &output_name, const std::string &output_name,
const kernels::BufferType type) { const kernels::BufferType type) {
MACE_CHECK_NOTNULL(net); MACE_CHECK_NOTNULL(net);
OpDefBuilder("BufferToImage", "BufferToImageTest") OpDefBuilder("BufferToImage", "BufferToImageTest")
.Input(input_name) .Input(input_name)
.Output(output_name) .Output(output_name)
...@@ -412,6 +413,8 @@ void ImageToBuffer(OpsTestNet *net, ...@@ -412,6 +413,8 @@ void ImageToBuffer(OpsTestNet *net,
const std::string &input_name, const std::string &input_name,
const std::string &output_name, const std::string &output_name,
const kernels::BufferType type) { const kernels::BufferType type) {
MACE_CHECK_NOTNULL(net);
OpDefBuilder("ImageToBuffer", "ImageToBufferTest") OpDefBuilder("ImageToBuffer", "ImageToBufferTest")
.Input(input_name) .Input(input_name)
.Output(output_name) .Output(output_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册