summaryrefslogtreecommitdiffstats
path: root/views/controls/button/radio_button.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/button/radio_button.cc')
-rw-r--r--views/controls/button/radio_button.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/views/controls/button/radio_button.cc b/views/controls/button/radio_button.cc
index 20c55fa..45e3da7 100644
--- a/views/controls/button/radio_button.cc
+++ b/views/controls/button/radio_button.cc
@@ -29,7 +29,8 @@ RadioButton::~RadioButton() {
void RadioButton::SetChecked(bool checked) {
if (checked == RadioButton::checked())
return;
- if (!native_wrapper_->UsesNativeRadioButtonGroup() && checked) {
+ if (native_wrapper_ &&
+ !native_wrapper_->UsesNativeRadioButtonGroup() && checked) {
// We can't just get the root view here because sometimes the radio
// button isn't attached to a root view (e.g., if it's part of a tab page
// that is currently not active).