SWDEV-316819 - Adding Graph null check
Change-Id: I22774109a13c3123e89b82bd6e05e1eea26f80fc
This commit is contained in:
@@ -1134,10 +1134,13 @@ hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNo
|
||||
|
||||
hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t* pGraph) {
|
||||
HIP_INIT_API(hipGraphChildGraphNodeGetGraph, node, pGraph);
|
||||
if (node == nullptr) {
|
||||
if (node == nullptr || pGraph == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
*pGraph = reinterpret_cast<hipChildGraphNode*>(node)->GetChildGraph();
|
||||
if (pGraph == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
HIP_RETURN(hipSuccess);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user