bo: validate the bo through the gBufMgr, not bo->bufmgr 84/171284/1
authorSooChan Lim <sc1.lim@samsung.com>
Wed, 28 Feb 2018 07:34:33 +0000 (16:34 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 28 Feb 2018 07:34:33 +0000 (16:34 +0900)
Change-Id: I6e92775ef19e58594b5792c5bfe24d4b4ab72856

src/tbm_bo.c

index ed12dfc..cb18292 100644 (file)
@@ -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;
        }