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 <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2026-01-27 14:23:54 +02:00
parent a2b1189306
commit d299c6ba95

View file

@ -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");