Skip to content

Commit 68784dd

Browse files
committed
Fix error on copying entity data with custom properties
1 parent 749abae commit 68784dd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sledge.BspEditor.Editing/Components/Properties/Tabs/ClassInfoTab.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ private void BtnPaste_Click(object sender, EventArgs e)
193193
var newKey = newClass.Properties.FirstOrDefault(x => (x.Name ?? "").ToLower() == splitvalue[0]);
194194

195195
// Brand new key, mark it as added and add it to the list.
196+
if (newKey == null) newKey = new Property(splitvalue[0], VariableType.String);
196197
var value = GetDefaultOption(newKey);
197198
_tableValues.Add(new TableValue(newKey, splitvalue[0], new[] { splitvalue[1] ?? "" }) { IsAdded = value != null ? true : false });
198199
}

0 commit comments

Comments
 (0)