Mercurial > hg > ucis.core
diff FBGUI/FBGUI.cs @ 69:82290dc1403c
Fix crash in FBGUI renderer shutdown
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Wed, 16 Oct 2013 17:00:19 +0200 |
parents | aedd0e4adef7 |
children | 8f31b164ce7e 1a10ca0f662e |
line wrap: on
line diff
--- a/FBGUI/FBGUI.cs Wed Oct 16 16:58:39 2013 +0200 +++ b/FBGUI/FBGUI.cs Wed Oct 16 17:00:19 2013 +0200 @@ -787,7 +787,10 @@ PaintTimer = null; } Orphaned(); - if (Frontbuffer != null) Frontbuffer.Dispose(); + lock (RenderLock) { + if (Frontbuffer != null) Frontbuffer.Dispose(); + Frontbuffer = null; + } } public Bitmap LockBitmapBuffer() { Monitor.Enter(RenderLock);