From 582d4fb569f38776329e33bfabe714299ed97454 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 20 Jan 2008 19:42:01 +0000 Subject: [PATCH] Worked around a Mono bug with unsafe inline constructors. --- Source/Examples/OpenGL/GluTessellation.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Examples/OpenGL/GluTessellation.cs b/Source/Examples/OpenGL/GluTessellation.cs index 4db1b741..877ba491 100644 --- a/Source/Examples/OpenGL/GluTessellation.cs +++ b/Source/Examples/OpenGL/GluTessellation.cs @@ -89,10 +89,14 @@ namespace Examples #region CombineHandler - unsafe double*[] combineData = new double*[16]; + unsafe double*[] combineData; int data_index = 0; unsafe void CombineHandler(double[] coordinates, double*[] data, float[] weight, double** dataOut) { + // Workaround Mono 1.2.6 bug with unsafe inline initializers + if (combineData == null) + combineData = new double*[16]; + double* out_data = combineData[data_index] = (double*)Marshal.AllocHGlobal(6 * sizeof(double)); int i;