From: SooChan Lim Date: Wed, 28 Feb 2018 07:34:33 +0000 (+0900) Subject: bo: validate the bo through the gBufMgr, not bo->bufmgr X-Git-Tag: accepted/tizen/unified/20180308.070139~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d13d69830556419ca22c9d696d9e542ba2176fb;p=platform%2Fcore%2Fuifw%2Flibtbm.git bo: validate the bo through the gBufMgr, not bo->bufmgr Change-Id: I6e92775ef19e58594b5792c5bfe24d4b4ab72856 --- diff --git a/src/tbm_bo.c b/src/tbm_bo.c index ed12dfc..cb18292 100644 --- a/src/tbm_bo.c +++ b/src/tbm_bo.c @@ -306,19 +306,18 @@ _tbm_bo_is_valid(tbm_bo bo) return 0; } - bufmgr = bo->bufmgr; - - if (!TBM_BUFMGR_IS_VALID(bufmgr)) { - TBM_LOG_E("error: bo->bufmgr is not valid.\n"); + bufmgr = tbm_bufmgr_get(); + if (bufmgr == NULL) { + TBM_LOG_E("error: bufmgr is NULL.\n"); return 0; } - if (LIST_IS_EMPTY(&bo->bufmgr->bo_list)) { + if (LIST_IS_EMPTY(&bufmgr->bo_list)) { TBM_LOG_E("error: bo->bo->bufmgr->bo_list is EMPTY.\n"); return 0; } - LIST_FOR_EACH_ENTRY(old_data, &bo->bufmgr->bo_list, item_link) { + LIST_FOR_EACH_ENTRY(old_data, &bufmgr->bo_list, item_link) { if (old_data == bo) return 1; }