Update userpref.c

fix Crash on iOS 7