diff --git a/base-hw/src/core/kernel/thread.cc b/base-hw/src/core/kernel/thread.cc index 7842adf6c1..3211d2c34c 100644 --- a/base-hw/src/core/kernel/thread.cc +++ b/base-hw/src/core/kernel/thread.cc @@ -910,13 +910,17 @@ void Thread::_call_new_vm() void Thread::_call_run_vm() { /* check permissions */ - assert(_core()); - - /* get targeted vm via its id */ + if (!_core()) { + PWRN("not entitled to run virtual machine"); + return; + } + /* lookup virtual machine */ Vm * const vm = Vm::pool()->object(user_arg_1()); - assert(vm); - - /* run targeted vm */ + if (!vm) { + PWRN("failed to lookup virtual machine"); + return; + } + /* run virtual machine */ vm->run(); }