From 7d49e49e74c4eed0c14e354efde832c39b2740f4 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Sun, 28 Mar 2010 21:19:12 +0200 Subject: Fix crash when no callback is defined --- libssh/keyfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libssh/keyfiles.c') diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c index 70abbe1f..906e9847 100644 --- a/libssh/keyfiles.c +++ b/libssh/keyfiles.c @@ -677,7 +677,7 @@ ssh_private_key privatekey_from_file(ssh_session session, const char *filename, switch (type) { case TYPE_DSS: if (passphrase == NULL) { - if (session->callbacks->auth_function) { + if (session->callbacks && session->callbacks->auth_function) { auth_cb = session->callbacks->auth_function; auth_ud = session->callbacks->userdata; -- cgit v1.2.3