Index: chrome/browser/ui/views/omnibox/omnibox_view_win.cc |
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc |
index 1fecea8e197831826fa79f2b8a9ee6da9e60c26f..2d81c0d2748bc2f674bdc8c055e1b08408e68006 100644 |
--- a/chrome/browser/ui/views/omnibox/omnibox_view_win.cc |
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_win.cc |
@@ -529,8 +529,10 @@ OmniboxViewWin::OmniboxViewWin(OmniboxEditController* controller, |
OmniboxViewWin::~OmniboxViewWin() { |
// Explicitly release the text object model now that we're done with it, and |
// before we free the library. If the library gets unloaded before this |
- // released, it becomes garbage. |
- text_object_model_->Release(); |
+ // released, it becomes garbage. Note that since text_object_model_ is lazy |
+ // initialized, it may still be null. |
+ if (text_object_model_) |
+ text_object_model_->Release(); |
// We balance our reference count and unpatch when the last instance has |
// been destroyed. This prevents us from relying on the AtExit or static |