timeline: Check for timelog scope being enabled

As further weston_log_subscription_iterate implicitly assumes we can
create one, and that might not be always the case.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2025-03-11 16:00:57 +02:00
parent 413e471fb1
commit 1181d638ac

View file

@ -377,6 +377,9 @@ weston_timeline_refresh_subscription_objects(struct weston_compositor *wc,
{ {
struct weston_log_subscription *sub = NULL; struct weston_log_subscription *sub = NULL;
if (!weston_log_scope_is_enabled(wc->timeline))
return;
while ((sub = weston_log_subscription_iterate(wc->timeline, sub))) { while ((sub = weston_log_subscription_iterate(wc->timeline, sub))) {
struct weston_timeline_subscription_object *sub_obj; struct weston_timeline_subscription_object *sub_obj;