prevent crashing the preferences

Signed-off-by: Lehner Florian <dev@der-flo.net>