diff options
Diffstat (limited to 'examples/libssh_scp.c')
-rw-r--r-- | examples/libssh_scp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/libssh_scp.c b/examples/libssh_scp.c index d443f8f2..fefaed84 100644 --- a/examples/libssh_scp.c +++ b/examples/libssh_scp.c @@ -286,7 +286,7 @@ int main(int argc, char **argv){ break; } } - if(dest->is_ssh){ + if (dest->is_ssh && dest->scp != NULL) { r=ssh_scp_close(dest->scp); if(r == SSH_ERROR){ fprintf(stderr,"Error closing scp: %s\n",ssh_get_error(dest->session)); |