From 99a09b13891da45fd2c77372830185f5996ef206 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 29 Apr 2021 16:49:23 +0900 Subject: [PATCH] tbm_surface_internal: set an error when the refcnt of a surface is less than 0 Only at TW3, we can watch that the refcnt of a surface is less than 0 when we run tbm-haltests all. Change-Id: I614c48c412783bbbe7a21cca905da3440e7057f0 --- src/tbm_surface_internal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tbm_surface_internal.c b/src/tbm_surface_internal.c index 79f94a6..90e5222 100644 --- a/src/tbm_surface_internal.c +++ b/src/tbm_surface_internal.c @@ -1139,6 +1139,8 @@ tbm_surface_internal_destroy(tbm_surface_h surface) if (surface->refcnt == 0) _tbm_surface_internal_destroy(surface); + else // if (surface->refcnt < 0) + _tbm_set_last_result(TBM_ERROR_INVALID_PARAMETER); _tbm_surface_mutex_unlock(); } -- 2.7.4