summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-11-05 11:09:11 -0400
committerPatrick Scott <phanna@android.com>2010-11-05 11:09:11 -0400
commit9ed478e218e8457e213e199a682bfb6a55f9d523 (patch)
tree5964e95729588a691086c4a3961f7a29b70592ab
parentf27fc812b6f9c8e44806849bdf68f6e5399f3081 (diff)
downloadexternal_webkit-9ed478e218e8457e213e199a682bfb6a55f9d523.zip
external_webkit-9ed478e218e8457e213e199a682bfb6a55f9d523.tar.gz
external_webkit-9ed478e218e8457e213e199a682bfb6a55f9d523.tar.bz2
Fix browser crash.
Also fixed indenting (3 spaces?). Change-Id: If4a137d1af3ec8a597e8b929e5b4f10240f2f054
-rw-r--r--WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
index f80168d..217bbc0 100644
--- a/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
+++ b/WebKit/android/WebCoreSupport/autofill/WebAutoFill.cpp
@@ -194,13 +194,15 @@ void WebAutoFill::setProfile(int id, const string16& fullName, const string16& e
void WebAutoFill::clearProfiles()
{
- // For now Chromium only ever knows about one profile, so we can just
- // remove it by unique id. If we support multiple profiles in the future
- // we need to remove them all here.
- int uniqueProfileId = mAutoFillProfile->unique_id();
- if (uniqueProfileId != NO_PROFILE_SET)
- mTabContents->profile()->GetPersonalDataManager()->RemoveProfile(uniqueProfileId);
- mAutoFillProfile.set(0);
+ if (!mAutoFillProfile)
+ return;
+ // For now Chromium only ever knows about one profile, so we can just
+ // remove it by unique id. If we support multiple profiles in the future
+ // we need to remove them all here.
+ int uniqueProfileId = mAutoFillProfile->unique_id();
+ if (uniqueProfileId != NO_PROFILE_SET)
+ mTabContents->profile()->GetPersonalDataManager()->RemoveProfile(uniqueProfileId);
+ mAutoFillProfile.set(0);
}
}