Commit 6afb1521 authored by Simon Ser's avatar Simon Ser Committed by Pekka Paalanen

Print NULL strings as "nil" in wl_closure_print

Calling printf("%s", NULL) is undefined behaviour.
Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent d3251402
Pipeline #16940 passed with stage
in 1 minute and 53 seconds
......@@ -1278,7 +1278,10 @@ wl_closure_print(struct wl_closure *closure, struct wl_object *target, int send)
wl_fixed_to_double(closure->args[i].f));
break;
case 's':
fprintf(stderr, "\"%s\"", closure->args[i].s);
if (closure->args[i].s)
fprintf(stderr, "\"%s\"", closure->args[i].s);
else
fprintf(stderr, "nil");
break;
case 'o':
if (closure->args[i].o)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment