Fix segfault when searching an empty listing