Index: code/branches/presentation/src/modules/objects/triggers/DistanceMultiTrigger.cc
===================================================================
--- code/branches/presentation/src/modules/objects/triggers/DistanceMultiTrigger.cc	(revision 8667)
+++ code/branches/presentation/src/modules/objects/triggers/DistanceMultiTrigger.cc	(revision 8675)
@@ -53,5 +53,5 @@
         Default Constructor. Registers the object and initializes default values.
     */
-    DistanceMultiTrigger::DistanceMultiTrigger(BaseObject* creator) : MultiTrigger(creator), beaconMask_(NULL)
+    DistanceMultiTrigger::DistanceMultiTrigger(BaseObject* creator) : MultiTrigger(creator)
     {
         RegisterObject(DistanceMultiTrigger);
@@ -60,4 +60,6 @@
         this->setBeaconModeDirect(distanceMultiTriggerBeaconMode::off);
         this->targetName_ = "";
+        this->beaconMask_.exclude(Class(BaseObject));
+        this->beaconMask_.include(Class(DistanceTriggerBeacon));
     }
 
@@ -68,6 +70,5 @@
     DistanceMultiTrigger::~DistanceMultiTrigger()
     {
-        if(this->beaconMask_ != NULL)
-            delete this->beaconMask_;
+
     }
 
@@ -135,5 +136,5 @@
         // If we are in identify-mode another target mask has to be applies to find the DistanceTriggerBeacons.
         if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify)
-            targetMask = *this->beaconMask_;
+            targetMask = this->beaconMask_;
 
         // Iterate through all objects that are targets of the DistanceMultiTrigger.
@@ -207,10 +208,4 @@
     {
         this->beaconMode_ = mode;
-        if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify && this->beaconMask_ == NULL)
-        {
-            this->beaconMask_ = new ClassTreeMask();
-            this->beaconMask_->exclude(Class(BaseObject));
-            this->beaconMask_->include(Class(DistanceTriggerBeacon));
-        }
     }
     
Index: code/branches/presentation/src/modules/objects/triggers/DistanceMultiTrigger.h
===================================================================
--- code/branches/presentation/src/modules/objects/triggers/DistanceMultiTrigger.h	(revision 8667)
+++ code/branches/presentation/src/modules/objects/triggers/DistanceMultiTrigger.h	(revision 8675)
@@ -152,5 +152,5 @@
             distanceMultiTriggerBeaconMode::Value beaconMode_; //!< The beacon mode, the DistanceMultiTrigger is in.
             std::string targetName_; //!< The target name, used in <em>single-target</em> mode.
-            ClassTreeMask* beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
+            ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
 
             std::map<WorldEntity*, WeakPtr<WorldEntity>* > range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger.
Index: code/branches/presentation/src/modules/objects/triggers/DistanceTrigger.cc
===================================================================
--- code/branches/presentation/src/modules/objects/triggers/DistanceTrigger.cc	(revision 8667)
+++ code/branches/presentation/src/modules/objects/triggers/DistanceTrigger.cc	(revision 8675)
@@ -57,5 +57,5 @@
         The creator of this trigger.
     */
-    DistanceTrigger::DistanceTrigger(BaseObject* creator) : Trigger(creator), beaconMask_(NULL)
+    DistanceTrigger::DistanceTrigger(BaseObject* creator) : Trigger(creator)
     {
         RegisterObject(DistanceTrigger);
@@ -64,4 +64,6 @@
         this->targetMask_.exclude(Class(BaseObject));
         this->targetName_ = "";
+        this->beaconMask_.exclude(Class(BaseObject));
+        this->beaconMask_.include(Class(DistanceTriggerBeacon));
     }
 
@@ -72,7 +74,5 @@
     DistanceTrigger::~DistanceTrigger()
     {
-        // Delete the beacon mask if it exists.
-        if(this->beaconMask_ != NULL)
-            delete this->beaconMask_;
+
     }
 
@@ -159,5 +159,5 @@
         // If we are in identify-mode another target mask has to be applies to find the DistanceTriggerBeacons.
         if(this->beaconMode_ == distanceTriggerBeaconMode::identify)
-            targetMask = *this->beaconMask_;
+            targetMask = this->beaconMask_;
 
         // Iterate through all objects that are targets of the DistanceTrigger.
@@ -231,10 +231,4 @@
     {
         this->beaconMode_ = mode;
-        if(this->beaconMode_ == distanceTriggerBeaconMode::identify && this->beaconMask_ == NULL)
-        {
-            this->beaconMask_ = new ClassTreeMask();
-            this->beaconMask_->exclude(Class(BaseObject));
-            this->beaconMask_->include(Class(DistanceTriggerBeacon));
-        }
     }
 
Index: code/branches/presentation/src/modules/objects/triggers/DistanceTrigger.h
===================================================================
--- code/branches/presentation/src/modules/objects/triggers/DistanceTrigger.h	(revision 8667)
+++ code/branches/presentation/src/modules/objects/triggers/DistanceTrigger.h	(revision 8675)
@@ -162,5 +162,5 @@
             distanceTriggerBeaconMode::Value beaconMode_; //!< The beacon mode.
             std::string targetName_; //!< The name a DistanceTriggerBeacon needs to have to make the DistanceTrigger react to it if in beacon-mode.
-            ClassTreeMask* beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
+            ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
             
             WeakPtr<WorldEntity> cache_; //!< Caches the entity that triggered the DistanceTrigger last.
