X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fsupertux%2Fstatistics.cpp;h=94d6325b055528bf00b5e81dec412619e0c975fe;hb=313702b84f43dc98bbeea32a2261e408533dbf58;hp=56cb3cdf73a78521588fa11ef8b110d36e10dc59;hpb=a8057c3d1726484928a3091fdd5c7a3d810f5f63;p=supertux.git 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