protocol: assert if the loop initialization fails on the connection test

This test needs an environment set up to load everything correctly,
running it directly results in a segfault. Let's make sure we assert on
a NULL loop to make this look slightly more planned.
This commit is contained in:
Peter Hutterer 2021-08-04 15:28:33 +10:00
parent c6dc7e98fd
commit 99a10c1606
1 changed files with 1 additions and 0 deletions

View File

@ -191,6 +191,7 @@ int main(int argc, char *argv[])
pw_init(&argc, &argv);
loop = pw_main_loop_new(NULL);
spa_assert_se(loop != NULL);
context = pw_context_new(pw_main_loop_get_loop(loop), NULL, 0);
if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {