Do not fail an assertion if QRCode support is not built-in, just print an error message.

This commit is contained in:
Ghislain MARY 2018-06-18 14:54:06 +02:00
parent 4e6c089046
commit e70294f3f3

View file

@ -92,8 +92,10 @@ static void _decode_qrcode(const char* image_path, image_rect *rect) {
LinphoneCoreManager* lcm = NULL;
MSFactory* factory = NULL;
factory = ms_factory_new_with_voip();
if (!BC_ASSERT_PTR_NOT_NULL(ms_factory_lookup_filter_by_name(factory, "MSQRCodeReader")))
if (!ms_factory_lookup_filter_by_name(factory, "MSQRCodeReader")) {
ms_error("QRCode support is not built-in");
goto end;
}
lcm =linphone_core_manager_create("empty_rc");
LinphoneCoreCbs* cbs = NULL;