From 2944fbb5329fc3026c541fa818489954d910625d Mon Sep 17 00:00:00 2001 From: "aleksandar.stojiljkovic" Date: Thu, 5 Nov 2015 07:48:12 -0800 Subject: 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 --- src/utils/win/SkWGL_win.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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, -- cgit v1.2.3