Fix crash if fnext/fprev are given an empty folder list
authorPeter Maydell <pmaydell@chiark.greenend.org.uk>
Mon, 20 Dec 2010 21:13:32 +0000 (21:13 +0000)
committerPeter Maydell <pmaydell@chiark.greenend.org.uk>
Mon, 20 Dec 2010 21:13:32 +0000 (21:13 +0000)
commit9530ace10a49d62c80c95914601fa9246099501b
tree91908a72d5fd9934e3dc9b02e68959a6ad096817
parentedcaa954bab2d48b54ab3dbcbe3788dc104044dc
Fix crash if fnext/fprev are given an empty folder list

Add a check for a NULL pointer, which stops fnext/fprev
from segfaulting if given an empty folder list (for example
via 'fnext -folders emptyfile').

Signed-off-by: Peter Maydell <pmaydell@chiark.greenend.org.uk>
uip/new.c