projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82bb12e
)
Fix coverity #29357
author
Tobias Markus
<tobbi@mozilla-uk.org>
Fri, 27 Feb 2015 16:30:56 +0000
(17:30 +0100)
committer
Tobias Markus
<tobbi@mozilla-uk.org>
Fri, 27 Feb 2015 16:30:56 +0000
(17:30 +0100)
src/supertux/statistics.cpp
patch
|
blob
|
history
diff --git
a/src/supertux/statistics.cpp
b/src/supertux/statistics.cpp
index
56cb3cd
..
94d6325
100644
(file)
--- a/
src/supertux/statistics.cpp
+++ b/
src/supertux/statistics.cpp
@@
-74,7
+74,8
@@
Statistics::serialize_to_squirrel(HSQUIRRELVM vm)
if (time != nv_time) scripting::store_float(vm, "time-needed", time);
if (secrets != nv_secrets) scripting::store_int(vm, "secrets-found", secrets);
if (total_secrets != nv_secrets) scripting::store_int(vm, "secrets-found-total", total_secrets);
- sq_createslot(vm, -3);
+ if(SQ_FAILED(sq_createslot(vm, -3)))
+ throw scripting::SquirrelError(vm, "Couldn't create statistics table");
}
void