Found the pointer problem. Changed MazeArray and currentNode to pointers to nodes, rather than nodes