diff options
-rw-r--r-- | mv_barcode/barcode_generator/src/mv_barcode_generate.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mv_barcode/barcode_generator/src/mv_barcode_generate.cpp b/mv_barcode/barcode_generator/src/mv_barcode_generate.cpp index 339767fe..3bdaed52 100644 --- a/mv_barcode/barcode_generator/src/mv_barcode_generate.cpp +++ b/mv_barcode/barcode_generator/src/mv_barcode_generate.cpp @@ -95,15 +95,17 @@ int mv_barcode_generate_image(mv_engine_config_h engine_cfg, const char *message MEDIA_VISION_FUNCTION_ENTER(); MEDIA_VISION_SUPPORT_CHECK(mv_check_feature_key(feature_keys, num_keys, false)); MEDIA_VISION_CHECK_ERR(__check_barcode_param(message, type, qr_enc_mode, qr_ecc, qr_version), "Invalid parameter"); - MEDIA_VISION_NULL_ARG_CHECK(image_path); if (image_format < MV_BARCODE_IMAGE_FORMAT_BMP || image_format >= MV_BARCODE_IMAGE_FORMAT_NUM) { LOGE("Not supported image format [%d]", image_format); return MEDIA_VISION_ERROR_INVALID_PARAMETER; } + if (image_path == NULL) { + LOGE("image_path is NULL"); + return MEDIA_VISION_ERROR_INVALID_PATH; + } if (image_width <= 0 || image_height <= 0) { LOGE("Barcode image size is invalid: %d x %d. Terminate write to the image operation", image_width, image_height); - // TCT need INVALID_DATA instead of INVALID_PARAMETER return MEDIA_VISION_ERROR_INVALID_DATA; } |