scripting: fixed segfault in CmdFunction::reset() if the engine is already gone

This is related to 00b26794c31051b6710ccf7bad1ea393a9ebb6ca in CallFunction.hpp.

Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>