SWDEV-325545 - hipGraphGetEdges when both from/to are null

Change-Id: Id69d87537a8a7fb7df447cee586137ff1342ce26
This commit is contained in:
Ajay
2022-03-02 19:01:47 +00:00
committed by Ajay GunaShekar
parent 65cb94a720
commit f2254e0c34
+2 -1
View File
@@ -1292,7 +1292,8 @@ hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t* from, hipGraphNode
size_t* numEdges) {
HIP_INIT_API(hipGraphGetEdges, graph, from, to, numEdges);
if (graph == nullptr || numEdges == nullptr ||
from == nullptr || to == nullptr) {
(from == nullptr && to != nullptr) ||
(to == nullptr && from != nullptr)) {
HIP_RETURN(hipErrorInvalidValue);
}
const std::vector<std::pair<Node, Node>> edges = graph->GetEdges();