Index: trunk/src/util/loading/load_param.cc
===================================================================
--- trunk/src/util/loading/load_param.cc	(revision 5218)
+++ trunk/src/util/loading/load_param.cc	(revision 5226)
@@ -213,5 +213,5 @@
  *  A list, that holds all the classes that are loadable (classes not objects!!)
 */
-tList<LoadClassDescription>* LoadClassDescription::classList = new tList<LoadClassDescription>;
+tList<LoadClassDescription>* LoadClassDescription::classList = NULL;
 
 /**
@@ -228,5 +228,8 @@
   strcpy(this->className, className);
 
-  classList->add(this);
+  if (LoadClassDescription::classList == NULL)
+    LoadClassDescription::classList = new tList<LoadClassDescription>;
+
+  LoadClassDescription::classList->add(this);
 
   this->paramList = new tList<LoadParamDescription>;
@@ -238,6 +241,4 @@
 LoadClassDescription::~LoadClassDescription()
 {
-  delete []this->className;
-
   tIterator<LoadParamDescription>* iterator = this->paramList->getIterator();
   LoadParamDescription* enumParamDesc = iterator->firstElement();
@@ -248,5 +249,25 @@
     }
   delete iterator;
-}
+
+  delete[] this->className;
+}
+
+void LoadClassDescription::deleteAllDescriptions()
+{
+  if (LoadClassDescription::classList != NULL)
+  {
+    tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
+    LoadClassDescription* delElem = iterator->firstElement();
+    while (delElem != NULL)
+    {
+      delete delElem;
+      delElem = iterator->nextElement();
+    }
+    delete iterator;
+    delete LoadClassDescription::classList;
+  }
+  LoadClassDescription::classList = NULL;
+}
+
 
 /**
@@ -259,17 +280,19 @@
 LoadClassDescription* LoadClassDescription::addClass(const char* className)
 {
-  tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
-  LoadClassDescription* enumClassDesc = iterator->firstElement();
-  while (enumClassDesc)
-    {
-      if (!strcmp(enumClassDesc->className, className))
-        {
-          delete iterator;
-          return enumClassDesc;
-        }
-      enumClassDesc = iterator->nextElement();
-    }
-  delete iterator;
-
+  if (LoadClassDescription::classList != NULL)
+  {
+    tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
+   LoadClassDescription* enumClassDesc = iterator->firstElement();
+   while (enumClassDesc)
+     {
+       if (!strcmp(enumClassDesc->className, className))
+         {
+           delete iterator;
+           return enumClassDesc;
+         }
+       enumClassDesc = iterator->nextElement();
+     }
+   delete iterator;
+  }
   return new LoadClassDescription(className);
 }
@@ -307,22 +330,27 @@
   PRINT(3)("===============================================================\n");
   PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n");
-  tIterator<LoadClassDescription>* classIT = LoadClassDescription::classList->getIterator();
-  LoadClassDescription* enumClassDesc = classIT->firstElement();
-  while (enumClassDesc)
-    {
-      PRINT(3)("<%s>\n", enumClassDesc->className);
-      tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator();
-      LoadParamDescription* enumParamDesc = paramIT->firstElement();
-      while (enumParamDesc)
-        {
-          enumParamDesc->print();
-          enumParamDesc = paramIT->nextElement();
-        }
-      delete paramIT;
-
-      PRINT(3)("</%s>\n\n", enumClassDesc->className);
-      enumClassDesc = classIT->nextElement();
-    }
-  delete classIT;
+  if (LoadClassDescription::classList != NULL)
+  {
+    tIterator<LoadClassDescription>* classIT = LoadClassDescription::classList->getIterator();
+    LoadClassDescription* enumClassDesc = classIT->firstElement();
+    while (enumClassDesc)
+     {
+       PRINT(3)("<%s>\n", enumClassDesc->className);
+       tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator();
+       LoadParamDescription* enumParamDesc = paramIT->firstElement();
+       while (enumParamDesc)
+         {
+           enumParamDesc->print();
+           enumParamDesc = paramIT->nextElement();
+         }
+       delete paramIT;
+
+       PRINT(3)("</%s>\n\n", enumClassDesc->className);
+       enumClassDesc = classIT->nextElement();
+     }
+    delete classIT;
+  }
+  else
+    PRINT(3)("no Classes defined so far\n");
   PRINT(3)("===============================================================\n");
 }
