diff options
author | aleksandar.stojiljkovic <aleksandar.stojiljkovic@intel.com> | 2015-11-05 07:48:12 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-05 07:48:12 -0800 |
commit | 2944fbb5329fc3026c541fa818489954d910625d (patch) | |
tree | ddaaae82ad283bccb9aadfbf67ba0152161ccf57 /src | |
parent | 8377e80951326f94714b31ede711cd0757d37fcd (diff) |
Assert when running SampleApp with msaa 16 on Windows 10
Trivial: skip calling SkWGLExtensions::selectFormat with 0 elements,
and handle if called.
BUG=4529
Review URL: https://codereview.chromium.org/1427583007
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/win/SkWGL_win.cpp | 3 |
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, |