From 74f9ab8a1924188cc711b8e7c82ca64150c5d3fe Mon Sep 17 00:00:00 2001 From: triton Date: Thu, 18 Jun 2015 12:28:07 +0100 Subject: [PATCH] Check if we're generating copy constructors before trying to use them. --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index dd2cdbc9..b9db5fce 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1879,7 +1879,7 @@ namespace CppSharp.Generators.CSharp PushBlock(CSharpBlockKind.Method); WriteLine("private static {0}.Internal* __CopyValue({0}.Internal native)", className); WriteStartBraceIndent(); - if (@class.HasNonTrivialCopyConstructor) + if (@class.HasNonTrivialCopyConstructor && Options.GenerateCopyConstructors) { // Find a valid copy constructor overload. var copyCtorMethod = @class.Methods.FirstOrDefault(method =>