diff options
-rw-r--r-- | chrome/browser/chromeos/usb_mount_observer.cc | 6 | ||||
-rw-r--r-- | chrome/browser/dom_ui/filebrowse_ui.cc | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/usb_mount_observer.cc b/chrome/browser/chromeos/usb_mount_observer.cc index 200ed85..1bb559d 100644 --- a/chrome/browser/chromeos/usb_mount_observer.cc +++ b/chrome/browser/chromeos/usb_mount_observer.cc @@ -53,7 +53,11 @@ void USBMountObserver::OpenFileBrowse(const std::string& url, bool small) { Browser* browser; Profile* profile; - profile = BrowserList::GetLastActive()->profile(); + browser = BrowserList::GetLastActive(); + if (browser == NULL) { + return; + } + profile = browser->profile(); PrefService* pref_service = profile->GetPrefs(); if (!pref_service->GetBoolean(prefs::kLabsAdvancedFilesystemEnabled)) { return; diff --git a/chrome/browser/dom_ui/filebrowse_ui.cc b/chrome/browser/dom_ui/filebrowse_ui.cc index 1620fd3..0e074a8 100644 --- a/chrome/browser/dom_ui/filebrowse_ui.cc +++ b/chrome/browser/dom_ui/filebrowse_ui.cc @@ -999,7 +999,11 @@ Browser* FileBrowseUI::OpenPopup(Profile* profile, Browser* FileBrowseUI::GetPopupForPath(const std::string& path) { std::string current_path = path; if (current_path.empty()) { - Profile* profile = BrowserList::GetLastActive()->profile(); + Browser* browser = BrowserList::GetLastActive(); + if (browser == NULL) { + return NULL; + } + Profile* profile = browser->profile(); PrefService* pref_service = profile->GetPrefs(); bool is_enabled = pref_service->GetBoolean( prefs::kLabsAdvancedFilesystemEnabled); |