changeset 69:82290dc1403c

Fix crash in FBGUI renderer shutdown
author Ivo Smits <Ivo@UCIS.nl>
date Wed, 16 Oct 2013 17:00:19 +0200
parents e811297f5aa4
children c22be6c412de
files FBGUI/FBGUI.cs
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
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);