From: Tobias Markus Date: Fri, 27 Feb 2015 16:30:56 +0000 (+0100) Subject: Fix coverity #29357 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=16821f2758e779138ebfe71b17cbb77f1b1aaf38;p=supertux.git Fix coverity #29357 --- diff --git a/src/supertux/statistics.cpp b/src/supertux/statistics.cpp index 56cb3cdf7..94d6325b0 100644 --- 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