Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3172


Ignore:
Timestamp:
Jun 14, 2009, 9:04:31 PM (16 years ago)
Author:
rgrieder
Message:

Hack-fixed exit crash: The Map stores a static MaterialPtr that gets destroyed after main and therefore after delete Ogre::Root.
This is no real solution because the Map destructor isn't even called at all, so I had to place a call in the GraphicsManager.

Location:
code/branches/pch/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/orxonox/GraphicsManager.cc

    r3131 r3172  
    6666#include "tools/ParticleInterface.h"
    6767
     68// HACK!
     69#include "overlays/map/Map.h"
     70
    6871namespace orxonox
    6972{
     
    142145//            Ogre::RenderSystem* renderer = this->ogreRoot_->getRenderSystem();
    143146//            renderer->destroyRenderWindow("Orxonox");
     147
     148            // HACK! This fixes an exit crash
     149            Map::hackDestroyMap();
    144150
    145151            // unload all compositors
  • code/branches/pch/src/orxonox/overlays/map/Map.cc

    r3154 r3172  
    402402    }
    403403
     404    // HACK!
     405    void Map::hackDestroyMap()
     406    {
     407        Map::OverlayMaterial_.setNull();
     408    }
     409
    404410    void Map::tick(float dt)
    405411    {
  • code/branches/pch/src/orxonox/overlays/map/Map.h

    r3154 r3172  
    5252
    5353        static void openMap();
     54        // HACK!
     55        static void hackDestroyMap();
    5456
    5557//Not yet implemented
Note: See TracChangeset for help on using the changeset viewer.