Index: chrome/browser/extensions/unpacked_installer.cc |
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc |
index 0f29e6c2fbb805cefaa8de399a4816bd0ab5f8a4..2970b9d0b083731a2014bd6d5ded94f71663f789 100644 |
--- a/chrome/browser/extensions/unpacked_installer.cc |
+++ b/chrome/browser/extensions/unpacked_installer.cc |
@@ -369,6 +369,11 @@ void UnpackedInstaller::ReportExtensionLoadError(const std::string &error) { |
void UnpackedInstaller::InstallExtension() { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ if (!service_weak_.get()) { |
+ callback_.Reset(); |
+ return; |
+ } |
+ |
PermissionsUpdater perms_updater(service_weak_->profile()); |
perms_updater.InitializePermissions(extension()); |
perms_updater.GrantActivePermissions(extension()); |