fix build java error

This commit is contained in:
yeyunpeng 2020-09-30 14:05:36 +08:00
parent 86bbd1dc98
commit 7587a5b7b3
2 changed files with 5 additions and 1 deletions

1
build.sh Normal file → Executable file
View File

@ -304,6 +304,7 @@ checkopts()
LITE_LANGUAGE="cpp"
elif [[ "$OPTARG" == "java" ]]; then
LITE_LANGUAGE="java"
ENABLE_CONVERTER="off"
elif [[ "$OPTARG" == "object-c" ]]; then
LITE_LANGUAGE="object-c"
else

View File

@ -116,8 +116,11 @@ kernel::LiteKernel *KernelRegistry::GetKernel(const std::vector<Tensor *> &in_te
auto creator = GetCreator(key);
if (creator != nullptr) {
auto kernel = creator(in_tensors, out_tensors, parameter, ctx, key, primitive);
return kernel;
if (kernel != nullptr) {
return kernel;
}
}
free(parameter);
return nullptr;
}