SWDEV-316819 - Adding Graph null check

Change-Id: I22774109a13c3123e89b82bd6e05e1eea26f80fc
This commit is contained in:
Payam
2022-02-15 10:54:38 -05:00
committed by Payam Ghafari
parent cd4591530d
commit dcac099922
+4 -1
View File
@@ -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);
}