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;