From d60c86364c396adee36aa5d353aa782bbf26e01e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 17 Oct 2006 13:19:55 +0000 Subject: r19372: Fix segfault for ui's that don't support comments. (This used to be commit 0eef6dabc6b6a4e883654c78a0b88cebb6b3d7cd) --- source4/torture/ui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/torture/ui.c b/source4/torture/ui.c index d8bff6cca3..beb0e8fa9c 100644 --- a/source4/torture/ui.c +++ b/source4/torture/ui.c @@ -49,7 +49,8 @@ void _torture_fail_ext(struct torture_context *context, va_start(ap, fmt); context->last_reason = talloc_vasprintf(context, fmt, ap); /* make sure the reason for the failure is displayed */ - context->ui_ops->comment(context, context->last_reason); + if (context->ui_ops->comment) + context->ui_ops->comment(context, context->last_reason); va_end(ap); context->last_result = TORTURE_FAIL; } -- cgit