From: levitte Date: Sun, 5 Oct 2008 08:00:13 +0000 (+0000) Subject: Only try to close the key if we got one... X-Git-Tag: yubikey-personalisation_0.97-1~131 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2445175d3f73add28690910018821c275d781fa4;p=yubikey-personalization Only try to close the key if we got one... git-svn-id: https://yubikey-personalization.googlecode.com/svn/trunk@30 b62f149e-849f-11dd-9899-c7ba65f7c4c7 --- diff --git a/ykpersonalize.c b/ykpersonalize.c index e2a2886..5fbfc36 100644 --- a/ykpersonalize.c +++ b/ykpersonalize.c @@ -220,7 +220,8 @@ main(int argc, char **argv) fclose(inf); if (outf) fclose(outf); - if (!yk_close_key(yk)) { + + if (yk && !yk_close_key(yk)) { report_yk_error(); exit_code = 2; }