fix.增加添加任务类型的检查

This commit is contained in:
MistEO
2022-03-12 00:41:54 +08:00
parent 3c7bb0f508
commit f2de68aac0

View File

@@ -105,6 +105,10 @@ asst::Assistant::TaskId asst::Assistant::append_task(const std::string& type, co
else if (type == RoguelikeTask::TaskType) {
ptr = std::make_shared<RoguelikeTask>(task_callback, (void*)this);
}
else {
Log.error(__FUNCTION__, "| invalid type:", type);
return 0;
}
bool params_ret = ptr->set_params(ret.value());
if (!params_ret) {