Index: /trunk/src/lib/graphics/graphics_engine.cc
===================================================================
--- /trunk/src/lib/graphics/graphics_engine.cc	(revision 5215)
+++ /trunk/src/lib/graphics/graphics_engine.cc	(revision 5216)
@@ -168,7 +168,10 @@
 void GraphicsEngine::setWindowName(const char* windowName, const char* icon)
 {
-  SDL_WM_SetIcon(SDL_LoadBMP(icon), NULL);
-
+  SDL_Surface* iconSurf = SDL_LoadBMP(icon);
+
+  SDL_WM_SetIcon(iconSurf, NULL);
   SDL_WM_SetCaption (windowName, icon);
+
+  delete iconSurf;
 }
 
@@ -211,5 +214,5 @@
     {
       PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
-      SDL_Quit();
+      //    SDL_Quit();
       //    return -1;
     }
Index: /trunk/src/lib/graphics/graphics_engine.h
===================================================================
--- /trunk/src/lib/graphics/graphics_engine.h	(revision 5215)
+++ /trunk/src/lib/graphics/graphics_engine.h	(revision 5216)
@@ -28,5 +28,5 @@
     virtual ~GraphicsEngine();
     /** @returns a Pointer to the only object of this Class */
-    inline static GraphicsEngine* getInstance() { if (!singletonRef) singletonRef = new GraphicsEngine();  return singletonRef; };
+    inline static GraphicsEngine* getInstance() { if (!GraphicsEngine::singletonRef) GraphicsEngine::singletonRef = new GraphicsEngine();  return GraphicsEngine::singletonRef; };
 
     int init();
Index: /trunk/src/lib/graphics/importer/model.cc
===================================================================
--- /trunk/src/lib/graphics/importer/model.cc	(revision 5215)
+++ /trunk/src/lib/graphics/importer/model.cc	(revision 5216)
@@ -92,4 +92,5 @@
   this->faceCount = 0;
   this->next = NULL;
+  this->listNumber = 0;
 
   this->firstFace = new ModelFace;
@@ -108,4 +109,7 @@
   if (this->next !=NULL)
     delete this->next;
+
+  //  if (this->listNumber != 0)
+//    glDeleteLists(this->listNumber, 1);
 }
 
Index: /trunk/src/lib/physics/physics_engine.cc
===================================================================
--- /trunk/src/lib/physics/physics_engine.cc	(revision 5215)
+++ /trunk/src/lib/physics/physics_engine.cc	(revision 5216)
@@ -70,5 +70,5 @@
 //   }
 //   delete itPI;
-//   delete this->interfaces;
+   delete this->interfaces;
 //
 //   // delete all PhysicsFields, still in existence (this could be dangerous)
Index: /trunk/src/lib/sound/sound_engine.h
===================================================================
--- /trunk/src/lib/sound/sound_engine.h	(revision 5215)
+++ /trunk/src/lib/sound/sound_engine.h	(revision 5216)
@@ -74,5 +74,5 @@
     virtual ~SoundEngine();
     /** @returns a Pointer to the only object of this Class */
-    inline static SoundEngine* getInstance() { if (!singletonRef) singletonRef = new SoundEngine();  return singletonRef; };
+    inline static SoundEngine* getInstance() { if (!SoundEngine::singletonRef) SoundEngine::singletonRef = new SoundEngine();  return SoundEngine::singletonRef; };
 
     void loadSettings(IniParser* iniParser);
Index: /trunk/src/orxonox.cc
===================================================================
--- /trunk/src/orxonox.cc	(revision 5215)
+++ /trunk/src/orxonox.cc	(revision 5216)
@@ -271,6 +271,7 @@
   }
    //! @todo this is a hack and should be loadable
-  ResourceManager::getInstance()->addImageDir(ResourceManager::getInstance()->getFullName("maps/"));
-  ResourceManager::getInstance()->debug();
+  char* imageDir = ResourceManager::getInstance()->getFullName("maps/");
+  ResourceManager::getInstance()->addImageDir(imageDir);
+  delete[] imageDir;
 
   PRINT(3)("initializing TextEngine\n");
Index: /trunk/src/story_entities/campaign.cc
===================================================================
--- /trunk/src/story_entities/campaign.cc	(revision 5215)
+++ /trunk/src/story_entities/campaign.cc	(revision 5216)
@@ -294,4 +294,5 @@
         {
           //printf("Campaing::getStoryEntity() - yea, this is what we where looking for: %id\n");
+          delete iterator;
           return entity;
         }
Index: /trunk/src/story_entities/world.cc
===================================================================
--- /trunk/src/story_entities/world.cc	(revision 5215)
+++ /trunk/src/story_entities/world.cc	(revision 5216)
@@ -381,5 +381,4 @@
   localCamera->setClipRegion(1, 10000.0);
   this->localPlayer->setParentMode(PNODE_ALL);
-  Vector* cameraOffset = new Vector (0, 5, -10);
   TrackManager::getInstance()->condition(1, LEFTRIGHT, this->localPlayer);
 
Index: /trunk/src/util/resource_manager.cc
===================================================================
--- /trunk/src/util/resource_manager.cc	(revision 5215)
+++ /trunk/src/util/resource_manager.cc	(revision 5216)
@@ -374,9 +374,9 @@
           break;
         }
-      if (tmpResource->pointer)
+      if (tmpResource->pointer != NULL)
         this->resourceList->add(tmpResource);
       delete[] fullName;
     }
-  if (tmpResource->pointer)
+  if (tmpResource->pointer != NULL)
     return tmpResource->pointer;
   else
Index: /trunk/src/world_entities/weapons/crosshair.cc
===================================================================
--- /trunk/src/world_entities/weapons/crosshair.cc	(revision 5215)
+++ /trunk/src/world_entities/weapons/crosshair.cc	(revision 5216)
@@ -190,5 +190,5 @@
 //   glEnd();
   glPushMatrix();
-  GLdouble pos[3];
+  GLdouble pos[3] = { 0.0, 0.0, 0.0};
   gluProject(this->getAbsCoor().x,
              this->getAbsCoor().y,
