Fixed state table creation issue on loading a savegame
authorIngo Ruhnke <grumbel@gmail.com>
Wed, 13 Aug 2014 21:22:55 +0000 (23:22 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Thu, 14 Aug 2014 00:59:02 +0000 (02:59 +0200)
src/supertux/savegame.cpp

index 34738c4..16c6a0f 100644 (file)
@@ -195,14 +195,8 @@ Savegame::load()
           {
             sq_pushroottable(vm);
             get_table_entry(vm, "state");
-
             scripting::load_squirrel_table(vm, -1, *state);
-            if(SQ_FAILED(sq_createslot(vm, -3)))
-            {
-              sq_pop(vm, 1);
-              throw std::runtime_error("Couldn't create state table");
-            }
-            sq_pop(vm, 1);
+            sq_pop(vm, 2);
           }
         }
       }