diff options
author | Leandro Ribeiro <leandro.ribeiro@collabora.com> | 2021-03-16 14:54:08 -0300 |
---|---|---|
committer | Leandro Ribeiro <leandro.ribeiro@collabora.com> | 2021-03-16 15:03:49 -0300 |
commit | 91f398bc302918969054d057c3a8cf8951eee408 (patch) | |
tree | 28d4d4aa2cc5a3c85e3fb6491880a9c9bf2093cc | |
parent | 1c73ff8d57404ba0e9bd36b2ecaa8448a809473d (diff) | |
download | weston-91f398bc302918969054d057c3a8cf8951eee408.tar.gz |
libweston: do not forget to check if test_data is NULL
Since commit "libweston: add required_capabilities test suite quirk"
a new function that depends on test_data is being called in wet_main().
We should check if test_data is NULL before calling it, otherwise
we have a segfault when running outside the test suite.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
-rw-r--r-- | compositor/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compositor/main.c b/compositor/main.c index f673fa3a..7b8c196f 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -3382,7 +3382,7 @@ wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data) goto out; } - if (!check_compositor_capabilities(wet.compositor, + if (test_data && !check_compositor_capabilities(wet.compositor, test_data->test_quirks.required_capabilities)) { ret = WET_MAIN_RET_MISSING_CAPS; goto out; |