Lock GDI+ portion og VectorRenderModule.GetDrawStringSize() to prevent concurrent thread use provoking mono crashes.
Same rationale as commit 13690582
.
0.7.3-extended
parent
2cc7a89012
commit
f6aa262585
|
@ -111,10 +111,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
|||
|
||||
public void GetDrawStringSize(string text, string fontName, int fontSize,
|
||||
out double xSize, out double ySize)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
using (Font myFont = new Font(fontName, fontSize))
|
||||
{
|
||||
SizeF stringSize = new SizeF();
|
||||
|
||||
// XXX: This lock may be unnecessary.
|
||||
lock (m_graph)
|
||||
{
|
||||
stringSize = m_graph.MeasureString(text, myFont);
|
||||
|
@ -123,6 +127,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
Loading…
Reference in New Issue