summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 18:27:27 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 18:27:27 +0000
commit03c3b1e4170e845842833ad64cf36676043a357a (patch)
tree6d215da94ba60e53c6023a5b0ace750bd4a0e3ff /chrome/browser/tab_contents
parent6254686d113f977626e824b02e8cb676556734ec (diff)
downloadchromium_src-03c3b1e4170e845842833ad64cf36676043a357a.zip
chromium_src-03c3b1e4170e845842833ad64cf36676043a357a.tar.gz
chromium_src-03c3b1e4170e845842833ad64cf36676043a357a.tar.bz2
Implement window state restoration for the views-gtk window.
Allows the window to be resized smaller than its current size by setting a minimum size before initiating the drag. Fixes a crash in TabContentsViewGtk due to a NULL delegate deref. BUG=none TEST=none Review URL: http://codereview.chromium.org/118227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17641 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_gtk.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
index 5103bc0..d18edbc 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
@@ -316,7 +316,9 @@ gboolean TabContentsViewGtk::OnSizeAllocate(GtkWidget* widget,
TabContentsViewGtk* view) {
int width = allocation->width;
int height = allocation->height;
- height += view->tab_contents()->delegate()->GetExtraRenderViewHeight();
+ // |delegate()| can be NULL here during browser teardown.
+ if (view->tab_contents()->delegate())
+ height += view->tab_contents()->delegate()->GetExtraRenderViewHeight();
gfx::Size size(width, height);
gtk_container_foreach(GTK_CONTAINER(widget), SetSizeRequest, &size);