From 96f9c09e35b2ae08e2f0473ffbdc178e73d84a31 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 22 Jan 2013 16:48:36 +0100 Subject: [PATCH] Fix a crash for the case that csync_init fails. --- src/vio/csync_vio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vio/csync_vio.c b/src/vio/csync_vio.c index 01910b74e4..946552b7db 100644 --- a/src/vio/csync_vio.c +++ b/src/vio/csync_vio.c @@ -661,7 +661,8 @@ char *csync_vio_get_error_string(CSYNC *ctx) if(ctx->error_string) { return ctx->error_string; } - if(VIO_METHOD_HAS_FUNC(ctx->module.method, get_error_string)) { + if(ctx && ctx->module.method && + VIO_METHOD_HAS_FUNC(ctx->module.method, get_error_string)) { return ctx->module.method->get_error_string(); } return NULL;