Skip to content

Commit 8caee8e

Browse files
committed
[SharpGen] "bases" Attribute is optional
1 parent 8431c75 commit 8caee8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Source/Tools/SharpGen/Parser/CppParser.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,9 @@ private CppInterface ParseInterface(XElement xElement)
876876

877877
// Calculate offset method using inheritance
878878
int offsetMethod = 0;
879-
string[] bases = xElement.AttributeValue("bases").Split(' ');
879+
880+
var basesValue = xElement.AttributeValue("bases");
881+
var bases = basesValue != null ? basesValue.Split(' ') : Enumerable.Empty<string>();
880882
foreach (var xElementBaseId in bases)
881883
{
882884
if (string.IsNullOrEmpty(xElementBaseId))

0 commit comments

Comments
 (0)