diff options
Diffstat (limited to 'include/pugl/detail/win_gl.c')
-rw-r--r-- | include/pugl/detail/win_gl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/pugl/detail/win_gl.c b/include/pugl/detail/win_gl.c index 096c715..4f71d76 100644 --- a/include/pugl/detail/win_gl.c +++ b/include/pugl/detail/win_gl.c @@ -160,9 +160,7 @@ puglWinGlConfigure(PuglView* view) // Set pixel format for fake window const PuglWinPFD fakePfd = puglWinGetPixelFormatDescriptor(view->hints); const int fakePfId = ChoosePixelFormat(fakeWin.hdc, &fakePfd); - if (!fakePfId) { - return puglWinError(&fakeWin, PUGL_SET_FORMAT_FAILED); - } else if (!SetPixelFormat(fakeWin.hdc, fakePfId, &fakePfd)) { + if (!fakePfId || !SetPixelFormat(fakeWin.hdc, fakePfId, &fakePfd)) { return puglWinError(&fakeWin, PUGL_SET_FORMAT_FAILED); } |