libseat: Assert that listener is non-NULL

This commit is contained in:
Kenny Levinsen 2020-08-29 20:27:02 +02:00
parent de96b3938b
commit 69d57aaf33
2 changed files with 10 additions and 17 deletions

View file

@ -32,7 +32,7 @@ static const struct named_backend impls[] = {
#endif
struct libseat *libseat_open_seat(struct libseat_seat_listener *listener, void *data) {
if (listener == NULL) {
if (listener == NULL || listener->enable_seat == NULL || listener->disable_seat == NULL) {
errno = EINVAL;
return NULL;
}