Index: code/branches/console/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/console/src/orxonox/overlays/InGameConsole.cc	(revision 5992)
+++ code/branches/console/src/orxonox/overlays/InGameConsole.cc	(revision 6004)
@@ -68,5 +68,5 @@
     */
     InGameConsole::InGameConsole()
-        : shell_(Shell::getInstance())
+        : shell_(new Shell("InGameConsole", true))
         , consoleOverlay_(0)
         , consoleOverlayContainer_(0)
@@ -100,4 +100,7 @@
         // destroy the input state previously created (InputBuffer gets destroyed by the Shell)
         InputManager::getInstance().destroyState("console");
+
+        // destroy the underlaying shell
+        this->shell_->destroy();
 
         Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
@@ -175,5 +178,5 @@
         // create the corresponding input state
         inputState_ = InputManager::getInstance().createInputState("console", false, false, InputStatePriority::Console);
-        inputState_->setKeyHandler(this->shell_.getInputBuffer());
+        inputState_->setKeyHandler(this->shell_->getInputBuffer());
         bHidesAllInputChanged();
 
@@ -253,5 +256,5 @@
         this->consoleOverlayContainer_->setTop(-1.2 * this->relativeHeight);
 
-        this->shell_.addOutputLevel(true);
+        this->shell_->addOutputLevel(true);
 
         COUT(4) << "Info: InGameConsole initialized" << std::endl;
@@ -267,9 +270,9 @@
     void InGameConsole::linesChanged()
     {
-        std::list<std::string>::const_iterator it = this->shell_.getNewestLineIterator();
+        std::list<std::string>::const_iterator it = this->shell_->getNewestLineIterator();
         int max = 0;
         for (int i = 1; i < LINES; ++i)
         {
-            if (it != this->shell_.getEndIterator())
+            if (it != this->shell_->getEndIterator())
             {
                 ++it;
@@ -296,5 +299,5 @@
     {
         if (LINES > 1)
-            this->print(*this->shell_.getNewestLineIterator(), 1);
+            this->print(*this->shell_->getNewestLineIterator(), 1);
     }
 
@@ -315,7 +318,7 @@
     {
         if (LINES > 0)
-            this->print(this->shell_.getInput(), 0);
-
-        if (this->shell_.getInput() == "" || this->shell_.getInput().size() == 0)
+            this->print(this->shell_->getInput(), 0);
+
+        if (this->shell_->getInput() == "" || this->shell_->getInput().size() == 0)
             this->inputWindowStart_ = 0;
     }
@@ -326,5 +329,5 @@
     void InGameConsole::cursorChanged()
     {
-        unsigned int pos = this->shell_.getCursorPosition() - inputWindowStart_;
+        unsigned int pos = this->shell_->getCursorPosition() - inputWindowStart_;
         if (pos > maxCharsPerLine_)
             pos = maxCharsPerLine_;
@@ -483,8 +486,8 @@
                 if (output.size() > this->maxCharsPerLine_)
                 {
-                    if (this->shell_.getInputBuffer()->getCursorPosition() < this->inputWindowStart_)
-                        this->inputWindowStart_ = this->shell_.getInputBuffer()->getCursorPosition();
-                    else if (this->shell_.getInputBuffer()->getCursorPosition() >= (this->inputWindowStart_ + this->maxCharsPerLine_ - 1))
-                        this->inputWindowStart_ = this->shell_.getInputBuffer()->getCursorPosition() - this->maxCharsPerLine_ + 1;
+                    if (this->shell_->getInputBuffer()->getCursorPosition() < this->inputWindowStart_)
+                        this->inputWindowStart_ = this->shell_->getInputBuffer()->getCursorPosition();
+                    else if (this->shell_->getInputBuffer()->getCursorPosition() >= (this->inputWindowStart_ + this->maxCharsPerLine_ - 1))
+                        this->inputWindowStart_ = this->shell_->getInputBuffer()->getCursorPosition() - this->maxCharsPerLine_ + 1;
 
                     output = output.substr(this->inputWindowStart_, this->maxCharsPerLine_);
@@ -507,5 +510,5 @@
             this->bActive_ = true;
             InputManager::getInstance().enterState("console");
-            this->shell_.registerListener(this);
+            this->shell_->registerListener(this);
 
             this->windowResized(this->windowW_, this->windowH_);
@@ -529,5 +532,5 @@
             this->bActive_ = false;
             InputManager::getInstance().leaveState("console");
-            this->shell_.unregisterListener(this);
+            this->shell_->unregisterListener(this);
 
             // scroll up
Index: code/branches/console/src/orxonox/overlays/InGameConsole.h
===================================================================
--- code/branches/console/src/orxonox/overlays/InGameConsole.h	(revision 5992)
+++ code/branches/console/src/orxonox/overlays/InGameConsole.h	(revision 6004)
@@ -81,5 +81,5 @@
 
     private: // variables
-        Shell& shell_;
+        Shell* shell_;
         bool bActive_;
         int windowW_;
