diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-23 22:28:03 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-23 22:28:03 +0000 |
commit | 479f3cc9df446ba15f58341379f129c1ccb8249c (patch) | |
tree | 8a0f30ee524fe9b10f275caa5c306bd18e39c2d2 /chrome/views | |
parent | 2913ec5e0bdba694c4e36b886eaf8e94f224d06e (diff) | |
download | chromium_src-479f3cc9df446ba15f58341379f129c1ccb8249c.zip chromium_src-479f3cc9df446ba15f58341379f129c1ccb8249c.tar.gz chromium_src-479f3cc9df446ba15f58341379f129c1ccb8249c.tar.bz2 |
Fix UI test:
NULL check the wrapper since this can be called when we're not in a view hierarchy.
TBR=jcampan
Review URL: http://codereview.chromium.org/42539
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12321 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views')
-rw-r--r-- | chrome/views/controls/button/native_button.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/views/controls/button/native_button.cc b/chrome/views/controls/button/native_button.cc index 9d681b7..3175c9a 100644 --- a/chrome/views/controls/button/native_button.cc +++ b/chrome/views/controls/button/native_button.cc @@ -85,6 +85,9 @@ void NativeButton::ButtonPressed() { // NativeButton, View overrides: gfx::Size NativeButton::GetPreferredSize() { + if (!native_wrapper_) + return gfx::Size(); + gfx::Size sz = native_wrapper_->GetView()->GetPreferredSize(); // Add in the border size. (Do this before clamping the minimum size in case |