From: dyamy-lee Date: Tue, 22 Dec 2020 05:21:41 +0000 (+0900) Subject: resolve termination of crash if it doesn't have display X-Git-Tag: submit/tizen_6.0/20210611.044034~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F65%2F250365%2F1;p=profile%2Fcommon%2Fapps%2Fnative%2Ffirmware-update-system-ui.git resolve termination of crash if it doesn't have display Change-Id: Ie73a4a093699d8a30be2270931f49d26ee779c10 --- diff --git a/base/base_gui_direct.c b/base/base_gui_direct.c index 5acee0a..b951bed 100644 --- a/base/base_gui_direct.c +++ b/base/base_gui_direct.c @@ -615,8 +615,10 @@ void _get_rotate(void) int fota_gr_direct_init(void) { /* open display interface */ - if (fb_open(&s_fbi) < 0) + if (fb_open(&s_fbi) < 0) { LOG("fb_open failed \n"); + return -1; + } _get_rotate(); __init_screen(&s_fbi); diff --git a/fota_gui_wearable/fota_gr_direct_ro_wearable.c b/fota_gui_wearable/fota_gr_direct_ro_wearable.c index eeb4d90..8dc2ccf 100644 --- a/fota_gui_wearable/fota_gr_direct_ro_wearable.c +++ b/fota_gui_wearable/fota_gr_direct_ro_wearable.c @@ -477,8 +477,10 @@ void fota_gr_direct_clear_screen(u32 color) int fota_gr_direct_init(void) { /* open display interface */ - if (fb_open(&s_fbi) < 0) + if (fb_open(&s_fbi) < 0) { LOG("fb_open failed \n"); + return -1; + } __init_screen(&s_fbi);