projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix all #29358 issues
[supertux.git]
/
src
/
worldmap
/
worldmap.cpp
diff --git
a/src/worldmap/worldmap.cpp
b/src/worldmap/worldmap.cpp
index
4aa05c7
..
f6be69f
100644
(file)
--- a/
src/worldmap/worldmap.cpp
+++ b/
src/worldmap/worldmap.cpp
@@
-1034,16
+1034,25
@@
WorldMap::save_state()
store_bool(vm, "perfect", level->perfect);
level->statistics.serialize_to_squirrel(vm);
store_bool(vm, "perfect", level->perfect);
level->statistics.serialize_to_squirrel(vm);
- sq_newslot(vm, -3, SQFalse);
+ if(SQ_FAILED(sq_newslot(vm, -3, SQFalse)))
+ {
+ throw std::runtime_error("failed to create '" + name + "' table entry");
+ }
}
}
- sq_newslot(vm, -3, SQFalse);
+ if(SQ_FAILED(sq_newslot(vm, -3, SQFalse)))
+ {
+ throw std::runtime_error("failed to create '" + name + "' table entry");
+ }
// overall statistics...
total_stats.serialize_to_squirrel(vm);
// push world into worlds table
// overall statistics...
total_stats.serialize_to_squirrel(vm);
// push world into worlds table
- sq_newslot(vm, -3, SQFalse);
+ if(SQ_FAILED(sq_newslot(vm, -3, SQFalse)))
+ {
+ throw std::runtime_error("failed to create '" + name + "' table entry");
+ }
} catch(std::exception& ) {
sq_settop(vm, oldtop);
}
} catch(std::exception& ) {
sq_settop(vm, oldtop);
}