Index: /issm/trunk/src/c/objects/Elements/PentaHook.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/PentaHook.cpp	(revision 4411)
+++ /issm/trunk/src/c/objects/Elements/PentaHook.cpp	(revision 4412)
@@ -36,5 +36,5 @@
 
 	for(i=0;i<this->numanalyses;i++){
-		delete this->hnodes[i];
+		if (this->hnodes[i]) delete this->hnodes[i];
 	}
 	delete [] this->hnodes;
@@ -83,7 +83,11 @@
 	for(i=0;i<this->numanalyses;i++){
 		/*Do not do anything if Hook is empty*/
-		if (this->hnodes[i]->GetNum()==0) continue;
-		/*Else, spawn Hook*/
-		triahook->hnodes[i]=this->hnodes[i]->Spawn(indices,3);
+		if (!this->hnodes[i] || this->hnodes[i]->GetNum()==0){
+			triahook->hnodes[i]=NULL;
+		}
+		else{
+			/*Else, spawn Hook*/
+			triahook->hnodes[i]=this->hnodes[i]->Spawn(indices,3);
+		}
 	}
 	triahook->hmatice=(Hook*)this->hmatice->copy();
Index: /issm/trunk/src/c/objects/Elements/TriaHook.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/TriaHook.cpp	(revision 4411)
+++ /issm/trunk/src/c/objects/Elements/TriaHook.cpp	(revision 4412)
@@ -34,5 +34,5 @@
 
 	for(i=0;i<this->numanalyses;i++){
-		delete this->hnodes[i];
+		if (this->hnodes[i]) delete this->hnodes[i];
 	}
 	delete [] this->hnodes;
