summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp')
-rw-r--r--xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp b/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp
index adb12f25b1..617dd17ff7 100644
--- a/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp
+++ b/xfa/fxbarcode/qrcode/BC_QRCodeWriter.cpp
@@ -85,7 +85,8 @@ uint8_t* CBC_QRCodeWriter::Encode(const CFX_WideString& contents,
break;
default: {
e = BCExceptionUnSupportEclevel;
- BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
+ if (e != BCExceptionNO)
+ return nullptr;
}
}
CBC_QRCoder qr;
@@ -95,7 +96,8 @@ uint8_t* CBC_QRCodeWriter::Encode(const CFX_WideString& contents,
} else {
CBC_QRCoderEncoder::Encode(contents, ec, &qr, e);
}
- BC_EXCEPTION_CHECK_ReturnValue(e, nullptr);
+ if (e != BCExceptionNO)
+ return nullptr;
outWidth = qr.GetMatrixWidth();
outHeight = qr.GetMatrixWidth();
uint8_t* result = FX_Alloc2D(uint8_t, outWidth, outHeight);