Bug 712980 - java.lang.NullPointerException @ org.mozilla.gecko.GeckoPreferences.onPreferenceChange [r=mfinkle]

This commit is contained in:
Brad Lassey 2011-12-26 10:19:27 -05:00
parent b70f8b5a51
commit 31d980c48b

View File

@ -142,7 +142,7 @@ public class GeckoPreferences
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String prefName = preference.getKey();
if (prefName.equals("privacy.masterpassword.enabled")) {
if (prefName != null && prefName.equals("privacy.masterpassword.enabled")) {
showDialog((Boolean)newValue ? DIALOG_CREATE_MASTER_PASSWORD : DIALOG_REMOVE_MASTER_PASSWORD);
return false;
}