Index: ui/views/controls/scrollbar/native_scroll_bar_views.cc |
diff --git a/ui/views/controls/scrollbar/native_scroll_bar_views.cc b/ui/views/controls/scrollbar/native_scroll_bar_views.cc |
index 06e96a2e23d0510019b58deaf1e3e04373430eda..f9ac51ca64e79e068fe024ec4541156336c0e72f 100644 |
--- a/ui/views/controls/scrollbar/native_scroll_bar_views.cc |
+++ b/ui/views/controls/scrollbar/native_scroll_bar_views.cc |
@@ -382,6 +382,8 @@ NativeScrollBarWrapper* NativeScrollBarWrapper::CreateWrapper( |
// static |
int NativeScrollBarWrapper::GetHorizontalScrollBarHeight( |
const ui::NativeTheme* theme) { |
+ if (!theme) |
+ theme = ui::NativeTheme::instance(); |
ui::NativeTheme::ExtraParams button_params; |
button_params.scrollbar_arrow.is_hovering = false; |
gfx::Size button_size = theme->GetPartSize( |
@@ -402,6 +404,8 @@ int NativeScrollBarWrapper::GetHorizontalScrollBarHeight( |
// static |
int NativeScrollBarWrapper::GetVerticalScrollBarWidth( |
const ui::NativeTheme* theme) { |
+ if (!theme) |
+ theme = ui::NativeTheme::instance(); |
ui::NativeTheme::ExtraParams button_params; |
button_params.scrollbar_arrow.is_hovering = false; |
gfx::Size button_size = theme->GetPartSize( |