Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 7368)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 7369)
@@ -1650,13 +1650,18 @@
 /*FUNCTION Penta::CreateKMatrixThermal {{{1*/
 ElementMatrix* Penta::CreateKMatrixThermal(void){
+	
+	ElementMatrix* Ke =NULL;
 
 	/*compute all stiffness matrices for this element*/
 	ElementMatrix* Ke1=CreateKMatrixThermalVolume();
 	ElementMatrix* Ke2=CreateKMatrixThermalShelf();
-	ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
-
-	/*clean-up and return*/
-	delete Ke1;
-	delete Ke2;
+	
+	if(Ke1 || Ke2){
+		 Ke=new ElementMatrix(Ke1,Ke2);
+
+		/*clean-up and return*/
+		delete Ke1;
+		delete Ke2;
+	}
 	return Ke;
 }
