From f33951ba9ecd00b5cbcb81252df77e8b5b4d3719 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Thu, 29 Apr 2021 10:48:11 +0900 Subject: [PATCH] Fix so that error log is not printed when tpl_display is reused. Change-Id: Iab3be64d490dd0e8592dc57d413877e37e107fa1 Signed-off-by: Joonbum Ko --- src/tpl_display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tpl_display.c b/src/tpl_display.c index a125a3f..fe7dbaf 100644 --- a/src/tpl_display.c +++ b/src/tpl_display.c @@ -31,7 +31,10 @@ tpl_display_create(tpl_backend_type_t type, tpl_handle_t native_dpy) display = __tpl_runtime_find_display(type, native_dpy); /* If tpl_display already exists, then return it */ - TPL_CHECK_ON_TRUE_RETURN_VAL(display, display); + if (display) { + TPL_LOG_F("already initialized display(%p)", display); + return display; + } /* if backend is unknown, try to find the best match from the list of supported types */ if (TPL_BACKEND_UNKNOWN == type) -- 2.7.4