!7064 fix build java error

Merge pull request !7064 from yeyunpeng2020/java_fix
This commit is contained in:
mindspore-ci-bot 2020-09-30 14:37:32 +08:00 committed by Gitee
commit 49c78de682
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;
}