aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/win/SkWGL_win.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp
index bc22795e2f..5afcae94ce 100644
--- a/src/utils/win/SkWGL_win.cpp
+++ b/src/utils/win/SkWGL_win.cpp
@@ -126,6 +126,9 @@ int SkWGLExtensions::selectFormat(const int formats[],
int formatCount,
HDC dc,
int desiredSampleCount) const {
+ if (formatCount <= 0) {
+ return -1;
+ }
PixelFormat desiredFormat = {
0,
desiredSampleCount,