Fixed segfault caused by reallocPtree'ing an empty ptree.