X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getlistcountcommand.cpp;fp=getlistcountcommand.cpp;h=94437fddfa766efe0bf25233914fe59befd9f204;hb=72ebb6fa35b45b149812d47c2b1cb8acaca64659;hp=f14e17a951eec96494dd36a87d259f6117cc758c;hpb=c4fb347858dd8cfea4d2933f429fff4130dca65b;p=mothur.git diff --git a/getlistcountcommand.cpp b/getlistcountcommand.cpp index f14e17a..94437fd 100644 --- a/getlistcountcommand.cpp +++ b/getlistcountcommand.cpp @@ -120,6 +120,8 @@ int GetListCountCommand::execute(){ } if ((anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) { + string saveLabel = list->getLabel(); + delete list; list = input->getListVector(lastLabel); @@ -127,6 +129,9 @@ int GetListCountCommand::execute(){ processedLabels.insert(list->getLabel()); userLabels.erase(list->getLabel()); + + //restore real lastlabel to save below + list->setLabel(saveLabel); } lastLabel = list->getLabel();