aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Interface.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-03-02 08:53:46 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-03-02 08:53:46 +0100
commitb4e481513e4370c4324226c54f8cc730d65440b3 (patch)
tree3b05d63c853b5d6a581308e6d86b59c19880d662 /src/Interface.cs
parent2ad97c8acf95eac31a13b7ad6aec1a721d0bd0f8 (diff)
lock RenderMutex when loading, test lqi==null, list loading slowed down
Diffstat (limited to 'src/Interface.cs')
-rw-r--r--src/Interface.cs11
1 files 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;
}