mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-25 02:18:13 +02:00
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:
parent
6adef7fa06
commit
dee08a8a32
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue