diff options
Diffstat (limited to 'src/WixToolset.Core/Compiler.cs')
| -rw-r--r-- | src/WixToolset.Core/Compiler.cs | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs index 437c1481..a4c289f7 100644 --- a/src/WixToolset.Core/Compiler.cs +++ b/src/WixToolset.Core/Compiler.cs | |||
| @@ -1097,24 +1097,27 @@ namespace WixToolset.Core | |||
| 1097 | } | 1097 | } |
| 1098 | 1098 | ||
| 1099 | HashSet<string> uniqueContexts = new HashSet<string>(); | 1099 | HashSet<string> uniqueContexts = new HashSet<string>(); |
| 1100 | foreach (string context in contexts) | 1100 | if (contexts != null) |
| 1101 | { | 1101 | { |
| 1102 | if (uniqueContexts.Contains(context)) | 1102 | foreach (string context in contexts) |
| 1103 | { | ||
| 1104 | this.Core.Write(ErrorMessages.DuplicateContextValue(sourceLineNumbers, context)); | ||
| 1105 | } | ||
| 1106 | else | ||
| 1107 | { | 1103 | { |
| 1108 | uniqueContexts.Add(context); | 1104 | if (uniqueContexts.Contains(context)) |
| 1109 | } | 1105 | { |
| 1106 | this.Core.Write(ErrorMessages.DuplicateContextValue(sourceLineNumbers, context)); | ||
| 1107 | } | ||
| 1108 | else | ||
| 1109 | { | ||
| 1110 | uniqueContexts.Add(context); | ||
| 1111 | } | ||
| 1110 | 1112 | ||
| 1111 | if (context.EndsWith("32", StringComparison.Ordinal)) | 1113 | if (context.EndsWith("32", StringComparison.Ordinal)) |
| 1112 | { | 1114 | { |
| 1113 | class32bit = true; | 1115 | class32bit = true; |
| 1114 | } | 1116 | } |
| 1115 | else | 1117 | else |
| 1116 | { | 1118 | { |
| 1117 | class16bit = true; | 1119 | class16bit = true; |
| 1120 | } | ||
| 1118 | } | 1121 | } |
| 1119 | } | 1122 | } |
| 1120 | 1123 | ||
