Skip to content

Commit

Permalink
macOS: Fix crash when supplying empty gl.Config
Browse files Browse the repository at this point in the history
  • Loading branch information
benmoran56 committed Dec 27, 2022
1 parent 44da172 commit 2f7e38d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
pyglet 2.0.3

Bugfixes
--------
- macOS: fix crash when supplying OpenGL Config without explicit major/minor versions #739


pyglet 2.0.2

Bugfixes
Expand Down
7 changes: 3 additions & 4 deletions pyglet/gl/cocoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@ def match(self, canvas):
elif _os_x_version >= os_x_release['lion']:
# check for opengl profile
# This requires OS-X Lion (Darwin 11) or higher
version = (
getattr(self, 'major_version', None) or 2,
getattr(self, 'minor_version', None)
)
version = (getattr(self, 'major_version', None) or 3,
getattr(self, 'minor_version', None) or 3)

# tell os-x we want to request a profile
attrs.append(cocoapy.NSOpenGLPFAOpenGLProfile)

Expand Down

0 comments on commit 2f7e38d

Please sign in to comment.