mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
do not crash qrcode tests when qrcode not compiled
This commit is contained in:
parent
d3cc676dbf
commit
42f7f9a349
1 changed files with 9 additions and 1 deletions
|
|
@ -89,7 +89,13 @@ typedef struct struct_image_rect {
|
|||
static void _decode_qrcode(const char* image_path, image_rect *rect) {
|
||||
qrcode_callback_data qrcode_data;
|
||||
char *qrcode_image;
|
||||
LinphoneCoreManager* lcm = linphone_core_manager_create("empty_rc");
|
||||
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")))
|
||||
goto end;
|
||||
|
||||
lcm =linphone_core_manager_create("empty_rc");
|
||||
LinphoneCoreCbs* cbs = NULL;
|
||||
qrcode_data.qrcode_found = FALSE;
|
||||
qrcode_data.text = NULL;
|
||||
|
|
@ -122,6 +128,8 @@ static void _decode_qrcode(const char* image_path, image_rect *rect) {
|
|||
|
||||
linphone_core_enable_video_preview(lcm->lc, FALSE);
|
||||
linphone_core_manager_destroy(lcm);
|
||||
end:
|
||||
ms_factory_destroy(factory);
|
||||
}
|
||||
|
||||
static void decode_qrcode_from_image(void) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue