]> git.donarmstrong.com Git - mothur.git/blobdiff - getoturepcommand.cpp
fixed some bugs
[mothur.git] / getoturepcommand.cpp
index 35e6924414931a11a5b476e5ecd77a9622bad8c2..65c18061cec3193da3de5e4f9678aa9655ba18d9 100644 (file)
@@ -156,11 +156,13 @@ void GetOTURepCommand::help(){
 //**********************************************************************************************************************
 
 GetOTURepCommand::~GetOTURepCommand(){
-       delete input;
-       delete read;
-       delete fasta;
-       if (groupfile != "") {
-               delete groupMap;
+       if (abort == false) {
+               delete input;  globaldata->ginput = NULL;
+               delete read;
+               delete fasta;
+               if (groupfile != "") {
+                       delete groupMap;  globaldata->gGroupmap = NULL;
+               }
        }
 }
 
@@ -177,8 +179,10 @@ int GetOTURepCommand::execute(){
                //read fastafile
                fasta->readFastaFile(in);
                
+               in.close();
+               
                //set format to list so input can get listvector
-//             globaldata->setFormat("list");
+               globaldata->setFormat("list");
                
                //if user gave a namesfile then use it
                if (namesfile != "") {