pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/worldmap manager.cxx,1.23,1.24 manag


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldmap manager.cxx,1.23,1.24 manager.hxx,1.17,1.18
Date: 19 Feb 2003 23:03:53 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/worldmap
In directory dark:/tmp/cvs-serv12793/worldmap

Modified Files:
        manager.cxx manager.hxx 
Log Message:
fixed worldmap crash


Index: manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldmap/manager.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- manager.cxx 19 Feb 2003 09:50:36 -0000      1.23
+++ manager.cxx 19 Feb 2003 23:03:51 -0000      1.24
@@ -28,10 +28,12 @@
 WorldMapManager* WorldMapManager::instance_ = 0;
 
 WorldMapManager::WorldMapManager ()
+  : worldmap(0),
+    new_worldmap(0)
 {
   is_init = false;
   exit_worldmap = false;
-
+ 
   // FIXME: The default startup map should be configurable by some file
   worldmap = new WorldMap (path_manager.complete("worldmaps/tutorial.xml"));
 
@@ -40,7 +42,8 @@
   // FIXME: a bit ugly because of the proteced member, but should work
   // FIXME: well enough. GUIScreen could also use multi-inheritage,
   // FIXME: but that could lead to member function name conflicts
-  gui_manager->add (&worldmap_component);
+  worldmap_component = new WorldMapComponent();
+  gui_manager->add (worldmap_component);
 }
 
 void

Index: manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldmap/manager.hxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- manager.hxx 19 Feb 2003 09:50:36 -0000      1.17
+++ manager.hxx 19 Feb 2003 23:03:51 -0000      1.18
@@ -60,8 +60,9 @@
     WorldMapComponent (const WorldMapComponent&);
     WorldMapComponent& operator= (const WorldMapComponent&);
 
-  } worldmap_component;
+  };
 
+  WorldMapComponent* worldmap_component;
     
   friend class WorldMapComponent;
 private:





reply via email to

[Prev in Thread] Current Thread [Next in Thread]