]> git.donarmstrong.com Git - mothur.git/blobdiff - venncommand.cpp
fixed some issues while testing 1.6
[mothur.git] / venncommand.cpp
index 84d33f226c760a100b05d38f6cdf89cb8c041112..f28800191f908ec7feabd8271228583b61c3b6a8 100644 (file)
@@ -275,7 +275,7 @@ int VennCommand::execute(){
                
                        //run last line if you need to
                        if (needToRun == true)  {
-                                       for (int i = 0; i < lookup.size(); i++) {  delete lookup[i];  } 
+                                       for (int i = 0; i < lookup.size(); i++) {  if (lookup[i] != NULL) {     delete lookup[i]; }  } 
                                        lookup = input->getSharedRAbundVectors(lastLabel);
 
                                        mothurOut(lookup[0]->getLabel()); mothurOutEndLine();
@@ -341,7 +341,7 @@ int VennCommand::execute(){
                
                        //run last line if you need to
                        if (needToRun == true)  {
-                               delete sabund;
+                               if (sabund != NULL) {   delete sabund;  }
                                sabund = input->getSAbundVector(lastLabel);
                                        
                                mothurOut(sabund->getLabel()); mothurOutEndLine();