]> git.donarmstrong.com Git - mothur.git/blobdiff - heatmapcommand.cpp
fixed some issues while testing 1.6
[mothur.git] / heatmapcommand.cpp
index 271a379cfefa2d238a9ac1b18b52412ab87ede7f..e2fdc645a83dfd72574bc8f14a61db30b74b4e45 100644 (file)
@@ -211,7 +211,7 @@ int HeatMapCommand::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();
@@ -274,7 +274,7 @@ int HeatMapCommand::execute(){
                        //run last line if you need to
                        if (needToRun == true)  {
                
-                               delete rabund;
+                               if (rabund != NULL) {   delete rabund;  }
                                rabund = input->getRAbundVector(lastLabel);
                                mothurOut(rabund->getLabel()); mothurOutEndLine();