seat: protect kmscon_seat_remove_display() correctly

We have to check for NULL pointers like all the other public entries do.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-12-02 12:42:07 +01:00
parent 63298eb881
commit dc1ac3d891

View File

@ -809,6 +809,9 @@ void kmscon_seat_remove_display(struct kmscon_seat *seat,
struct shl_dlist *iter;
struct kmscon_display *d;
if (!seat || !disp)
return;
shl_dlist_for_each(iter, &seat->displays) {
d = shl_dlist_entry(iter, struct kmscon_display, list);
if (d->disp != disp)