From d299c6ba959e66ebfffa2e69e586f4aea4d91ee5 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 27 Jan 2026 14:23:54 +0200 Subject: [PATCH] libweston: do not pass NULL role_name to fprintf Makes the print-out a little bit tidier. Passing NULL for "%s" is handled by glibc gracefully, but I'm not sure what standard requires it if any. Signed-off-by: Pekka Paalanen --- libweston/compositor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index f1c37bc9b..6f167cb83 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -9615,7 +9615,9 @@ debug_scene_view_print(FILE *fp, struct weston_view *view) strcpy(desc, "[no description available]"); } fprintf(fp, "\tView %s (role %s, PID %d, '%s'):\n", - view->internal_name, view->surface->role_name, pid, desc); + view->internal_name, + view->surface->role_name ?: "none", + pid, desc); if (!weston_view_is_mapped(view)) fprintf(fp, "\t[view is not mapped!]\n");