Commit c36633f2 authored by sky@chromium.org's avatar sky@chromium.org

Add NULL check for NativeTheme in scrollbar methods. A NULL theme can

happen with some code paths.

BUG=175600
TEST=none
R=sadrul@chromium.org


Review URL: https://chromiumcodereview.appspot.com/12212144

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182142 0039d316-1c4b-4281-b951-d872f2087c98
parent fabf594c
......@@ -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(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment