diff --git a/src/platform/gl.nim b/src/platform/gl.nim index 8de3247..3e48ab9 100644 --- a/src/platform/gl.nim +++ b/src/platform/gl.nim @@ -20,10 +20,12 @@ proc get_program_info_log*(program: GLuint): string = glGetProgramInfoLog(program, logSize.GLsizei, nil, s.cstring) return s -let main_thread_id = getThreadID() +when compileOption("threads"): + let main_thread_id = getThreadID() template handleError(x: untyped, t: string) = - assert main_thread_id == getThreadID() + when compileOption("threads"): + assert main_thread_id == getThreadID() try: x except: