libweston: assert make/model in weston_output_enable()

Output make and model are not allowed to be NULL in the protocol, so
ensure they are not forgotten when enabling an output.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Ian Ray <ian.ray@ge.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derekf@osg.samsung.com>
dev
Pekka Paalanen 7 years ago
parent ddce54de3a
commit ec25b0a844
  1. 6
      libweston/compositor.c

@ -5524,6 +5524,7 @@ weston_output_enable(struct weston_output *output)
{ {
struct weston_compositor *c = output->compositor; struct weston_compositor *c = output->compositor;
struct weston_output *iterator; struct weston_output *iterator;
struct weston_head *head;
int x = 0, y = 0; int x = 0, y = 0;
if (output->enabled) { if (output->enabled) {
@ -5538,6 +5539,11 @@ weston_output_enable(struct weston_output *output)
return -1; return -1;
} }
wl_list_for_each(head, &output->head_list, output_link) {
assert(head->make);
assert(head->model);
}
iterator = container_of(c->output_list.prev, iterator = container_of(c->output_list.prev,
struct weston_output, link); struct weston_output, link);

Loading…
Cancel
Save