diff --git a/lib/tftp.c b/lib/tftp.c index 5b473d70668e325d051d65c331ec68765e9f49ec..269d10f7adb32e9618d4a8f81cc603d6723450a7 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -1041,7 +1041,8 @@ static CURLcode tftp_done(struct connectdata *conn, CURLcode status, return CURLE_ABORTED_BY_CALLBACK; /* If we have encountered an error */ - code = tftp_translate_code(state->error); + if(state) + code = tftp_translate_code(state->error); return code; }