Commited patch from RavuAlHemio (bug #133) due to his svn write access problems.
authorArvid Norlander <anmaster@berlios.de>
Sat, 27 Jan 2007 20:02:17 +0000 (20:02 +0000)
committerArvid Norlander <anmaster@berlios.de>
Sat, 27 Jan 2007 20:02:17 +0000 (20:02 +0000)
SVN-Revision: 4692

src/scripting/functions.cpp

index 456b351..b978813 100644 (file)
@@ -166,7 +166,8 @@ void save_state()
   if(World::current() == NULL)
     throw std::runtime_error("Can't save state without active World");
 
-  WorldMap::current()->save_state();
+  if(WorldMap::current() != NULL)
+    WorldMap::current()->save_state();
   World::current()->save_state();
 }