Skip to content

Commit

Permalink
if we destroy the shader - make sure we do it from the right context!
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@2947 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Mar 13, 2013
1 parent 2fa12a7 commit d6ca08c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/xpra/gl/gl_window_backing.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,13 @@ def close(self):

def remove_shader(self):
if self.yuv_shader:
glDisable(GL_FRAGMENT_PROGRAM_ARB)
glDeleteProgramsARB(1, self.yuv_shader)
drawable = self.gl_init()
if drawable:
try:
glDisable(GL_FRAGMENT_PROGRAM_ARB)
glDeleteProgramsARB(1, self.yuv_shader)
finally:
self.gl_end(drawable)
self.yuv_shader = None

def gl_begin(self):
Expand Down

0 comments on commit d6ca08c

Please sign in to comment.