From b4e481513e4370c4324226c54f8cc730d65440b3 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Wed, 2 Mar 2016 08:53:46 +0100 Subject: [PATCH] lock RenderMutex when loading, test lqi==null, list loading slowed down --- src/Interface.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Interface.cs b/src/Interface.cs index 36ac681d..82688594 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -205,9 +205,11 @@ namespace Crow public GraphicObject LoadInterface (string path) { - GraphicObject tmp = Interface.Load (path, this); - AddWidget (tmp); - return tmp; + lock (RenderMutex) { + GraphicObject tmp = Interface.Load (path, this); + AddWidget (tmp); + return tmp; + } } #endregion @@ -310,7 +312,8 @@ namespace Crow while (queueCount > 0) { lock (Interface.LayoutingQueue) lqi = Interface.LayoutingQueue.Dequeue (); - lqi.ProcessLayouting (); + if (lqi!=null) + lqi.ProcessLayouting (); lock (Interface.LayoutingQueue) queueCount = Interface.LayoutingQueue.Count; } -- 2.47.3