From faffe2f2f9beda067d2e7bb68918c43bb55ef595 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 3 Aug 2012 22:03:04 +0100 Subject: Fix the recent windows compile error by putting newFont for case "R" in VectorRenderModule inside its own context, rather than disposing of the old font before using it as a prototype for the new. --- .../CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 6b9f537..ca320e1 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs @@ -596,9 +596,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender } break; case "R": -// Font newFont = new Font(myFont, FontStyle.Regular); - myFont.Dispose(); - myFont = new Font(myFont, FontStyle.Regular); + // We need to place this newFont inside its own context so that the .NET compiler + // doesn't complain about a redefinition of an existing newFont, even though there is none + // The mono compiler doesn't produce this error. + { + Font newFont = new Font(myFont, FontStyle.Regular); + myFont.Dispose(); + myFont = newFont; + } break; } } -- cgit v1.1