summaryrefslogtreecommitdiffstats
path: root/views/controls/button/checkbox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/button/checkbox.cc')
-rw-r--r--views/controls/button/checkbox.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc
index 8783bcf..af6a7b4 100644
--- a/views/controls/button/checkbox.cc
+++ b/views/controls/button/checkbox.cc
@@ -53,6 +53,9 @@ int Checkbox::GetTextIndent() {
// Checkbox, View overrides:
gfx::Size Checkbox::GetPreferredSize() {
+ if (!native_wrapper_)
+ return gfx::Size();
+
gfx::Size prefsize = native_wrapper_->GetView()->GetPreferredSize();
prefsize.set_width(
prefsize.width() + kCheckboxLabelSpacing +