Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc

Issue 8893010: GTK: Speculative fix for crash in BalloonViewHost. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc
index ee44ae8f0ca65aed6c28d74d4e30311570e9b4e7..af7f91c95df0631d8d091284481d74a99f62dd7e 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_host_gtk.cc
@@ -18,7 +18,13 @@ BalloonViewHost::~BalloonViewHost() {
}
void BalloonViewHost::UpdateActualSize(const gfx::Size& new_size) {
- tab_contents_->render_view_host()->view()->SetSize(new_size);
+ RenderViewHost* host = tab_contents_->render_view_host();
+ if (host) {
+ RenderWidgetHostView* view = host->view();
+ if (view)
+ view->SetSize(new_size);
+ }
+
gtk_widget_set_size_request(
native_view(), new_size.width(), new_size.height());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698