Fix crash in show_notes_tree.

Signed-off-by: Niko Rosvall <niko@ideabyte.net>