Chromium Code Reviews| Index: src/utils/win/SkWGL_win.cpp | 
| diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp | 
| index ef07bea61e7bb2b6ac138c641d5d4febcd65799d..a26bce5eec11552ef50f43865bca64dfcbd7411c 100644 | 
| --- a/src/utils/win/SkWGL_win.cpp | 
| +++ b/src/utils/win/SkWGL_win.cpp | 
| @@ -123,6 +123,9 @@ int SkWGLExtensions::selectFormat(const int formats[], | 
| int formatCount, | 
| HDC dc, | 
| int desiredSampleCount) const { | 
| + if (formatCount <= 0) { | 
| + return -1; | 
| + } | 
| PixelFormat desiredFormat = { | 
| 0, | 
| desiredSampleCount, |