Skip to content

Commit 0f8fff0

Browse files
committed
update macos safety check
1 parent 10d9c48 commit 0f8fff0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

py5_resources/py5_module/py5/macos_problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ def decorated(self_, *args):
101101
if _enforce_safety_check:
102102
if _first_renderer_opengl is None:
103103
# This is the first Sketch. Record if the renderer is OpenGL.
104-
if len(args) >= 2 and args[2] in OPENGL_RENDERERS:
104+
if len(args) >= 3 and args[2] in OPENGL_RENDERERS:
105105
_first_renderer_opengl = True
106106
else:
107107
_first_renderer_opengl = False
108108

109109
elif _first_renderer_opengl is False:
110110
# The first Sketch was not OpenGL. OpenGL is not allowed now.
111-
if len(args) >= 2 and args[2] in OPENGL_RENDERERS:
111+
if len(args) >= 3 and args[2] in OPENGL_RENDERERS:
112112
self_.println(MESSAGE)
113113
if platform.system() == "Darwin": # just in case
114114
self_.println("macOS version:", platform.mac_ver()[0])

0 commit comments

Comments
 (0)