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 <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2026-05-20 18:55:24 -05:00
parent 6adef7fa06
commit dee08a8a32

View file

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