Index: code/branches/modularships/src/orxonox/Scene.cc
===================================================================
--- code/branches/modularships/src/orxonox/Scene.cc	(revision 10035)
+++ code/branches/modularships/src/orxonox/Scene.cc	(revision 10036)
@@ -345,4 +345,6 @@
                                              int index0, const btCollisionObject* colObj1, int partId1, int index1)
     {
+        orxout() << "collisionCb()" << endl;
+
         // get the WorldEntity pointers
         SmartPtr<WorldEntity> object0 = static_cast<WorldEntity*>(colObj0->getUserPointer());
@@ -360,4 +362,6 @@
             modified |= object1->collidesAgainst(object0, cs0, cp);
 
+        orxout() << "collisionCb() completed." << endl;
+
         return modified;
     }
Index: code/branches/modularships/src/orxonox/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/branches/modularships/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 10035)
+++ code/branches/modularships/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 10036)
@@ -138,13 +138,10 @@
         if (this->attachedShapes_.find(shape) != this->attachedShapes_.end())
         {
-            orxout() << "Still going..." << endl;
             this->attachedShapes_.erase(shape);
             if (shape->getCollisionShape())
                 this->compoundShape_->removeChildShape(shape->getCollisionShape()); // TODO: Apparently this is broken?
             shape->notifyDetached();
-            orxout() << "Still going...." << endl;
 
             this->updatePublicShape();
-            orxout() << "Still going....." << endl;
         }
         else
Index: code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10035)
+++ code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10036)
@@ -42,4 +42,5 @@
 #include "collisionshapes/WorldEntityCollisionShape.h"
 #include <BulletCollision/CollisionShapes/btCollisionShape.h>
+#include <BulletCollision/CollisionShapes/btCompoundShape.h>
 
 
@@ -126,5 +127,32 @@
 
         this->partMap_[entity] = part;
+
+        //This adds a list of SmartPointers for all StaticEntities which have a ShipPart, preventing them from getting deleted. Hopefully.
+        SmartPtr<StaticEntity> newSmartPtr = entity;
+        SmartPtr<StaticEntity>* one = &newSmartPtr;
+        this->entityPtrList_.push_back(one);
+
+        this->createCSPtrList(this->getWorldEntityCollisionShape());
+
         orxout() << "New entity-part assignment created!" << endl;
+    }
+
+    // This should add smartPointers to all (Orxonox)Collisionshapes of this SpaceShip, preventing them fromg etting deleted. Might not work due to weird acting getAttachedShape
+    void ModularSpaceShip::createCSPtrList(CompoundCollisionShape* cs)
+    {
+        for (int i=0; i < cs->getNumChildShapes(); i++)
+        {
+
+            if (!orxonox_cast<CompoundCollisionShape*>(cs->getAttachedShape(i)))
+            {
+                SmartPtr<CollisionShape> newSmartPtr = cs->getAttachedShape(i);
+                SmartPtr<CollisionShape>* one = &newSmartPtr;
+                this->csPtrList_.push_back(one);
+            }
+
+            if (orxonox_cast<CompoundCollisionShape*>(cs->getAttachedShape(i)))
+                createCSPtrList((CompoundCollisionShape*)(cs->getAttachedShape(i)));
+
+        }
     }
 
Index: code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.h
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.h	(revision 10035)
+++ code/branches/modularships/src/orxonox/worldentities/pawns/ModularSpaceShip.h	(revision 10036)
@@ -122,4 +122,6 @@
             virtual void updatePartAssignment();
 
+            void createCSPtrList(CompoundCollisionShape* cs);
+
         protected:
 
@@ -128,4 +130,6 @@
             void registerVariables();
             std::vector<ShipPart*> partList_;  // The list of all Parts mounted on this ModularSpaceShip.
+            std::vector<SmartPtr<StaticEntity>*> entityPtrList_;
+            std::vector<SmartPtr<CollisionShape>*> csPtrList_;
             std::map<StaticEntity*, ShipPart*> partMap_;
         
