Skip to content

Commit

Permalink
Fix AvaloniaUI#7519 - Reset fb and depth buffer Ids once they are del…
Browse files Browse the repository at this point in the history
…eted
  • Loading branch information
odalet-addup authored and danwalmsley committed Feb 21, 2022
1 parent 8bc795b commit 2c53e06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Avalonia.OpenGL/Controls/OpenGlControlBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ void DoCleanup()
gl.BindTexture(GL_TEXTURE_2D, 0);
gl.BindFramebuffer(GL_FRAMEBUFFER, 0);
gl.DeleteFramebuffers(1, new[] { _fb });
_fb = 0;
gl.DeleteRenderbuffers(1, new[] { _depthBuffer });
_depthBuffer = 0;
_attachment?.Dispose();
_attachment = null;
_bitmap?.Dispose();
Expand Down

0 comments on commit 2c53e06

Please sign in to comment.