Fix a crash when General Settings is opened

Change-Id: Ia6da05c2628cb82479d2184c996b371f1f7cfb50
(cherry picked from commit 66439c77ccf84674760b7c30e299f9a27cdc3fd3)