mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 11:40:44 +08:00
dnn/NGraph: added nullptr checks
This commit is contained in:
parent
51bfe74ce1
commit
7ce518106b
@ -2158,6 +2158,7 @@ struct Net::Impl : public detail::NetImplBase
|
||||
Ptr<BackendNode> inpNode = inpLd.backendNodes[preferableBackend];
|
||||
if (!inpNode.empty()) {
|
||||
Ptr<InfEngineNgraphNode> ieNode = inpNode.dynamicCast<InfEngineNgraphNode>();
|
||||
CV_Assert(!ieNode.empty());
|
||||
ieNode->net->setUnconnectedNodes(ieNode);
|
||||
}
|
||||
}
|
||||
@ -2202,6 +2203,7 @@ struct Net::Impl : public detail::NetImplBase
|
||||
int cons_inp = cons->oid;
|
||||
Ptr<NgraphBackendWrapper> inpWrapper = inpLd.outputBlobsWrappers[cons_inp].
|
||||
dynamicCast<NgraphBackendWrapper>();
|
||||
CV_Assert(!inpWrapper.empty());
|
||||
auto iter = std::find(inputNames.begin(), inputNames.end(),
|
||||
inpWrapper->dataPtr->getName());
|
||||
if (iter == inputNames.end()) {
|
||||
|
Loading…
Reference in New Issue
Block a user