Recursion problem of hierarchical expansion of tree data structure

recently, when dealing with the expansion of a tree (root node with many layers of child nodes), using recursive expansion, there is a problem

TmObject is a node object with child nodes, and objList is an array size = 1, but children has many layers. I hope to find the object corresponding to mObject in this tree through sceneName traversal. The code is as follows. When I equals found this object, I found that the program continued recursion. What caused the problem?
private TmObject loanObjectByName (String sceneName, List < TmObject > objList) {

    TmObject temp = getObjByName(sceneName, objList);
    if (temp != null) {
        return temp;
    } else {
        for (TmObject scene : objList) {
            if (scene.getChildObject().size() > 0) {
                loanObjectByName(sceneName, scene.getChildObject());
            }
        }
    }
    return null;
}

private TmObject getObjByName(String name, List<TmObject> objList) {
    TmObject tmObject = null;
    for (TmObject tmTestS : objList) {
        if (name.equals(tmTestS.getSceneName())) {
            tmObject = tmTestS;
            break;
        }
    }
    return tmObject;
}

Jun.17,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3f9c0-4484a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3f9c0-4484a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?