Browse Source

add function param verify for Divide

tags/v1.2.0-rc1
xulei2020 4 years ago
parent
commit
1f7fb5e38c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/lite_mat.cc

+ 1
- 1
mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/lite_mat.cc View File

@@ -296,7 +296,7 @@ void LiteMat::AlignFree(void *ptr) {
inline void LiteMat::InitElemSize(LDataType data_type) { elem_size_ = data_type.SizeInBytes(); }

bool LiteMat::GetROI(int x, int y, int w, int h, LiteMat &m) {
if (x < 0 || y < 0 || x > width_ - w || h > height_ - y || w < 0 || h < 0) {
if (x < 0 || y < 0 || x > width_ - w || h > height_ - y || w <= 0 || h <= 0) {
return false;
}
if (!m.IsEmpty()) {


Loading…
Cancel
Save