From dee08a8a329c87a2a8be9751fced1cb848d75d30 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 20 May 2026 18:55:24 -0500 Subject: [PATCH] trace: Fix buffer annotator This was supposed to early return after logging the NULL buffer, not foolishly carry on and attempt to dereference it. Signed-off-by: Derek Foreman --- libweston/perfetto/annotations.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libweston/perfetto/annotations.c b/libweston/perfetto/annotations.c index 6c2d28241..b35afc99d 100644 --- a/libweston/perfetto/annotations.c +++ b/libweston/perfetto/annotations.c @@ -260,8 +260,10 @@ perfetto_annotate_buffer(struct weston_debug_annotations *annots, unsigned char key_size, const struct weston_buffer *buffer) { - if (!buffer) + if (!buffer) { perfetto_annotate_string(annots, key, key_size, "None"); + return; + } do_annotate_buffer(annots, annots->count, key, key_size, buffer); }