Fix so that error log is not printed when tpl_display is reused. 34/257734/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Thu, 29 Apr 2021 01:48:11 +0000 (10:48 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Fri, 30 Apr 2021 06:38:55 +0000 (15:38 +0900)
Change-Id: Iab3be64d490dd0e8592dc57d413877e37e107fa1
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_display.c

index a125a3f..fe7dbaf 100644 (file)
@@ -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)