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

Unified Diff: views/controls/button/native_button_win.cc

Issue 6268004: Fixes bug where if preferred size of button was asked for while there (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Created 9 years, 11 months 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: views/controls/button/native_button_win.cc
diff --git a/views/controls/button/native_button_win.cc b/views/controls/button/native_button_win.cc
index c0b26815542ef52588710e1481e1e2372570cdc7..9914638801116640349091ca6ab248ba69731062 100644
--- a/views/controls/button/native_button_win.cc
+++ b/views/controls/button/native_button_win.cc
@@ -111,7 +111,7 @@ gfx::NativeView NativeButtonWin::GetTestingHandle() const {
// NativeButtonWin, View overrides:
gfx::Size NativeButtonWin::GetPreferredSize() {
- if (!button_size_valid_) {
+ if (!button_size_valid_ && native_view()) {
SIZE sz = {0};
Button_GetIdealSize(native_view(), reinterpret_cast<LPARAM>(&sz));
button_size_.SetSize(sz.cx, sz.cy);
« 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