diff --git a/client/proxmark3.c b/client/proxmark3.c index f28e14063..a2d4ebd72 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -261,9 +261,11 @@ check_script: } } // end while - clearCommandBuffer(); - SendCommandNG(CMD_QUIT_SESSION, NULL, 0); - msleep(100); // Make sure command is sent before killing client + if (session.pm3_present) { + clearCommandBuffer(); + SendCommandNG(CMD_QUIT_SESSION, NULL, 0); + msleep(100); // Make sure command is sent before killing client + } while (current_cmdscriptfile()) pop_cmdscriptfile();