Commit 3bdbf7fe authored by junov@chromium.org's avatar junov@chromium.org

Fix crash in NativeThemeWin::PaintIndirect when HDC allocation fails

BUG=339117

Review URL: https://codereview.chromium.org/137383007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247856 0039d316-1c4b-4281-b951-d872f2087c98
parent 304db10e
...@@ -615,6 +615,8 @@ void NativeThemeWin::PaintIndirect(SkCanvas* canvas, ...@@ -615,6 +615,8 @@ void NativeThemeWin::PaintIndirect(SkCanvas* canvas,
skia::BitmapPlatformDevice::Create( skia::BitmapPlatformDevice::Create(
rect.width(), rect.height(), false, NULL)); rect.width(), rect.height(), false, NULL));
DCHECK(device); DCHECK(device);
if (!device)
return;
SkCanvas offscreen_canvas(device.get()); SkCanvas offscreen_canvas(device.get());
DCHECK(skia::SupportsPlatformPaint(&offscreen_canvas)); DCHECK(skia::SupportsPlatformPaint(&offscreen_canvas));
......
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