i'm trying to recurse through a quite big tree of images, but my code causes a node segfault after a random amount of images. have i done something very stupid here somewhere? http://pastie.org/4142039