From 91f245ab5b39d377366934cdc1b57ebd89f3d33d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 22 Dec 2008 18:53:19 +0100 Subject: Fix segfault when there are no tests registered. --- source4/torture/smbtorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c index 0c2c8c0f6b..635990354c 100644 --- a/source4/torture/smbtorture.c +++ b/source4/torture/smbtorture.c @@ -49,7 +49,7 @@ static bool run_matching(struct torture_context *torture, if (suite == NULL) { struct torture_suite *o; - for (o = torture_root->children; o; o = o->next) { + for (o = (torture_root == NULL?NULL:torture_root->children); o; o = o->next) { if (gen_fnmatch(expr, o->name) == 0) { *matched = true; reload_charcnv(torture->lp_ctx); -- cgit