Index: code/branches/libraries/src/orxonox/objects/quest/QuestManager.cc
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/QuestManager.cc	(revision 5616)
+++ code/branches/libraries/src/orxonox/objects/quest/QuestManager.cc	(revision 5617)
@@ -38,6 +38,4 @@
 
 #include "objects/infos/PlayerInfo.h"
-#include "objects/infos/PlayerInfo.h"
-#include "overlays/GUIOverlay.h"
 #include "Quest.h"
 #include "QuestHint.h"
@@ -203,5 +201,5 @@
     /**
     @brief
-        
+
     @param name
     @return
@@ -209,29 +207,17 @@
     QuestContainer* QuestManager::getQuestTree(std::string & name)
     {
-        GUIOverlay* gui = NULL;
-        for (ObjectList<GUIOverlay>::iterator it = ObjectList<GUIOverlay>::begin(); it != ObjectList<GUIOverlay>::end(); ++it)
-            if (it->getGUIName() == name)
-                gui = *it;
-
-        PlayerInfo* player;
-        if(gui == NULL)
-        {
-            COUT(1) << "Error: No GUIOverlay with the given name '" << name << "' present." << std::endl;
+        PlayerInfo* player = this->players_[name];
+        if(player == NULL)
+        {
+            COUT(1) << "Error: GUIOverlay with name '" << name << "' has no player." << std::endl;
             return NULL;
         }
-        BaseObject* obj = gui->getOwner();
-        if(obj == NULL)
-        {
-            COUT(1) << "Error: GUIOverlay has no owner. " << std::endl;
-            return NULL;
-        }
-        player = orxonox_cast<PlayerInfo*>(obj);
-    
+
         QuestContainer* root = NULL;
         QuestContainer* current = NULL;
-        
+
         std::list<Quest*>* rootQuests = new std::list<Quest*>();
         getRootQuests(player, *rootQuests);
-        
+
         for(std::list<Quest*>::iterator it = rootQuests->begin(); it != rootQuests->end(); it++)
         {
@@ -246,5 +232,5 @@
                 current->next = container;
             }
-            
+
             current = container;
 
@@ -260,5 +246,5 @@
     /**
     @brief
-        
+
     @param player
     @param list
@@ -279,5 +265,5 @@
     /**
     @brief
-        
+
     @param quest
     @param player
@@ -310,5 +296,5 @@
             COUT(1) << "An error occurred. A Quest of un-specified status wanted to be displayed." << std::endl;
         }
-        
+
         std::list<Quest*> quests = quest->getSubQuestList();
         QuestContainer* current = NULL;
@@ -329,5 +315,5 @@
                     current->next = subContainer;
                 }
-                
+
                 current = subContainer;
             }
@@ -336,5 +322,5 @@
             current->next = NULL;
         container->subQuests = first;
-        
+
         return container;
     }
@@ -342,5 +328,5 @@
     /**
     @brief
-        
+
     @param quest
     @param player
@@ -368,5 +354,5 @@
                     current->next = hint;
                 }
-                
+
                 current = hint;
             }
Index: code/branches/libraries/src/orxonox/objects/quest/QuestManager.h
===================================================================
--- code/branches/libraries/src/orxonox/objects/quest/QuestManager.h	(revision 5616)
+++ code/branches/libraries/src/orxonox/objects/quest/QuestManager.h	(revision 5617)
@@ -92,4 +92,9 @@
             QuestContainer* getQuestTree(std::string & name); // tolua_export
 
+            inline void setPlayer(const std::string& guiname, PlayerInfo* player)
+                { this->players_[guiname] = player; }
+            inline PlayerInfo* getPlayer(const std::string& guiname) const
+                { std::map<std::string, PlayerInfo*>::const_iterator it = this->players_.find(guiname); return (it != this->players_.end()) ? it->second : 0; }
+
         private:
             static QuestManager* singletonPtr_s;
@@ -97,4 +102,5 @@
             std::map<std::string, Quest*> questMap_; //!< All Quests registered by their id's.
             std::map<std::string, QuestHint*> hintMap_; //!< All QuestHints registered by their id's.
+            std::map<std::string, PlayerInfo*> players_; //!< Stores the player (owner) for each gui
 
             void getRootQuests(const PlayerInfo* player, std::list<Quest*> & list);
Index: code/branches/libraries/src/orxonox/overlays/GUIOverlay.cc
===================================================================
--- code/branches/libraries/src/orxonox/overlays/GUIOverlay.cc	(revision 5616)
+++ code/branches/libraries/src/orxonox/overlays/GUIOverlay.cc	(revision 5617)
@@ -36,4 +36,6 @@
 #include "core/GUIManager.h"
 #include "core/XMLPort.h"
+#include "objects/quest/QuestManager.h"
+#include "objects/infos/PlayerInfo.h"
 
 namespace orxonox
@@ -79,3 +81,8 @@
     }
 
+    void GUIOverlay::setGUIName(const std::string& name)
+    {
+        this->guiName_ = name;
+        QuestManager::getInstance().setPlayer(name, orxonox_cast<PlayerInfo*>(this->getOwner()));
+    }
 }
Index: code/branches/libraries/src/orxonox/overlays/GUIOverlay.h
===================================================================
--- code/branches/libraries/src/orxonox/overlays/GUIOverlay.h	(revision 5616)
+++ code/branches/libraries/src/orxonox/overlays/GUIOverlay.h	(revision 5617)
@@ -46,5 +46,5 @@
             virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
 
-            inline void setGUIName(const std::string& name) { this->guiName_ = name; }
+            void setGUIName(const std::string& name);
             inline const std::string& getGUIName() const { return this->guiName_; }
 
