Index: trunk/src/lib/coord/p_node.cc
===================================================================
--- trunk/src/lib/coord/p_node.cc	(revision 7123)
+++ trunk/src/lib/coord/p_node.cc	(revision 7125)
@@ -80,4 +80,5 @@
 PNode::~PNode ()
 {
+  printf("delete PNode: %s::%s\n", this->getClassName(), this->getName());
   // remove the Node, delete it's children (if required).
   std::list<PNode*>::iterator tmp = this->children.begin();
@@ -93,10 +94,26 @@
       {
         if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL)
+        {
+          printf("%s::%s deletes PNode: %s::%s\n",
+                 this->getClassName(), this->getName(),
+                 (*deleteNode)->getClassName(), (*deleteNode)->getName());
           delete (*deleteNode);
+        }
         else
+        {
+          printf("%s::%s reparents PNode: %s::%s\n",
+                 this->getClassName(), this->getName(),
+                 (*deleteNode)->getClassName(), (*deleteNode)->getName());
+
           (*deleteNode)->reparent();
+        }
       }
       else
+      {
+        printf("%s::%s deletes PNode: %s::%s\n",
+               this->getClassName(), this->getName(),
+               (*deleteNode)->getClassName(), (*deleteNode)->getName());
         delete (*deleteNode);
+      }
     }
 
Index: trunk/src/lib/lang/class_list.cc
===================================================================
--- trunk/src/lib/lang/class_list.cc	(revision 7123)
+++ trunk/src/lib/lang/class_list.cc	(revision 7125)
@@ -346,5 +346,5 @@
       niceString[30-strlen((*cl).className) - lenCount] = '\0';
 
-      PRINT(0)("| CLASS %s:%s %d\n", (*cl).className, niceString, (*cl).objectList.size());
+      PRINT(0)("| CLASS %s::%s %d\n", (*cl).className, niceString, (*cl).objectList.size());
 
       if (debugLevel >=2 && (*cl).objectList.size() > 0)
@@ -354,5 +354,5 @@
         for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++)
         {
-          PRINT(0)("|   (class %s): NAME(%s)->%p ", (*bo)->getClassName(), (*bo)->getName(), (*bo));
+          PRINT(0)("|   %s::%s::(0x%.8X->%p ", (*bo)->getClassName(), (*bo)->getName(), (*bo)->getClassID(), (*bo));
           if (debugLevel == 3)
             ClassList::whatIs(*bo);
Index: trunk/src/story_entities/game_world_data.cc
===================================================================
--- trunk/src/story_entities/game_world_data.cc	(revision 7123)
+++ trunk/src/story_entities/game_world_data.cc	(revision 7125)
@@ -260,5 +260,12 @@
   if (nodeList != NULL)
     while (!nodeList->empty())
-      delete nodeList->front();
+  {
+    ClassList::debug( 3, CL_PARENT_NODE);
+    PNode::getNullParent()->debugNode( 1);
+
+/*    printf("%s::%s\n", nodeList->front()->getClassName(), nodeList->front()->getName());*/
+    delete nodeList->front();
+    printf("OK\n");
+  }
   /* remove the player object */
   if( this->localPlayer)
@@ -294,4 +301,5 @@
   localCamera = NULL;
   localPlayer = NULL;
+  State::setCamera(NULL, NULL);
   sky = NULL;
   terrain = NULL;
Index: trunk/src/world_entities/effects/explosion.h
===================================================================
--- trunk/src/world_entities/effects/explosion.h	(revision 7123)
+++ trunk/src/world_entities/effects/explosion.h	(revision 7125)
@@ -33,5 +33,5 @@
 
     static SpriteParticles*    explosionParticles;
-    BoxEmitter*           emitter;
+    BoxEmitter*                emitter;
 };
 
Index: trunk/src/world_entities/environments/water.cc
===================================================================
--- trunk/src/world_entities/environments/water.cc	(revision 7123)
+++ trunk/src/world_entities/environments/water.cc	(revision 7125)
@@ -55,5 +55,4 @@
 
   this->rebuildGrid();
-  this->waterMaterial = new Material();
   this->waterShader = (Shader*)ResourceManager::getInstance()->load("shaders/water.vert", SHADER, RP_GAME, "shaders/water.frag");
 
@@ -65,5 +64,4 @@
 {
   delete this->grid;
-  delete this->waterMaterial;
 }
 
Index: trunk/src/world_entities/environments/water.h
===================================================================
--- trunk/src/world_entities/environments/water.h	(revision 7123)
+++ trunk/src/world_entities/environments/water.h	(revision 7125)
@@ -12,7 +12,8 @@
 /* INCLUDES */
 #include "world_entity.h"
+#include "material.h"
+
 
 /* FORWARD DECLARATION */
-class Material;
 class Grid;
 class Shader;
@@ -53,5 +54,5 @@
     float           cohesion;        //!< Cohesion.
 
-    Material*       waterMaterial;
+    Material        waterMaterial;
     Shader*         waterShader;
     float           height;          //!< The hight of the Water
Index: trunk/src/world_entities/skybox.cc
===================================================================
--- trunk/src/world_entities/skybox.cc	(revision 7123)
+++ trunk/src/world_entities/skybox.cc	(revision 7125)
@@ -104,5 +104,4 @@
 {
   PRINTF(5)("Deleting SkyBox\n");
-  this->setModel(NULL); //< so that WorldEntity does not try to delete it again.
   for (int i = 0; i < 6; i++)
   {
Index: trunk/src/world_entities/space_ships/turbine_hover.cc
===================================================================
--- trunk/src/world_entities/space_ships/turbine_hover.cc	(revision 7123)
+++ trunk/src/world_entities/space_ships/turbine_hover.cc	(revision 7125)
@@ -226,7 +226,10 @@
   dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
 
-  State::getCameraNode()->setParentSoft(&this->cameraNode);
-  State::getCameraNode()->setRelCoorSoft(-10, 0,0);
-  State::getCameraTargetNode()->setParentSoft(&this->cameraNode);
+  if (State::getCameraNode != NULL)
+  {
+    State::getCameraNode()->setParentSoft(&this->cameraNode);
+    State::getCameraNode()->setRelCoorSoft(-10, 0,0);
+    State::getCameraTargetNode()->setParentSoft(&this->cameraNode);
+  }
 }
 
Index: trunk/src/world_entities/world_entity.cc
===================================================================
--- trunk/src/world_entities/world_entity.cc	(revision 7123)
+++ trunk/src/world_entities/world_entity.cc	(revision 7125)
@@ -74,4 +74,10 @@
 WorldEntity::~WorldEntity ()
 {
+  State::getObjectManager()->toList(this, OM_INIT);
+
+  // Delete the model (unregister it with the ResourceManager)
+  for (unsigned int i = 0; i < this->models.size(); i++)
+    this->setModel(NULL, i);
+
   // Delete the obbTree
   if( this->obbTree != NULL)
@@ -81,9 +87,4 @@
     delete this->healthWidget;
 
-  // Delete the model (unregister it with the ResourceManager)
-  for (unsigned int i = 0; i < this->models.size(); i++)
-    this->setModel(NULL, i);
-
-  State::getObjectManager()->toList(this, OM_INIT);
 }
 
