summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/gtk/status_bubble_gtk.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/gtk/status_bubble_gtk.cc b/chrome/browser/gtk/status_bubble_gtk.cc
index 56670dd..99fbd32 100644
--- a/chrome/browser/gtk/status_bubble_gtk.cc
+++ b/chrome/browser/gtk/status_bubble_gtk.cc
@@ -89,6 +89,11 @@ void StatusBubbleGtk::SetURL(const GURL& url, const std::wstring& languages) {
void StatusBubbleGtk::SetStatusTextToURL() {
GtkWidget* parent = gtk_widget_get_parent(container_.get());
+
+ // It appears that parent can be NULL (probably only during shutdown).
+ if (!parent || !GTK_WIDGET_REALIZED(parent))
+ return;
+
int desired_width = parent->allocation.width;
if (!expanded()) {
expand_timer_.Stop();
@@ -106,7 +111,6 @@ void StatusBubbleGtk::SetStatusTextToURL() {
SetStatusTextTo(url_text_);
}
-
void StatusBubbleGtk::Show() {
// If we were going to hide, stop.
hide_timer_.Stop();