Fix for crash when opening retargeting options in rig asset editor.

#UE-15800
#codereview lina.halper

[CL 2557023 by Benn Gallagher in Main branch]
This commit is contained in:
Benn Gallagher
2015-05-19 10:49:45 -04:00
committed by Benn.Gallagher@epicgames.com
parent 5347fe968e
commit 15b0d4e8ed
2 changed files with 6 additions and 2 deletions

View File

@@ -271,7 +271,11 @@ void FRigDetails::GenerateTransformBaseArrayElementWidget(TSharedRef<IPropertyHa
// we add them on demand since the array can expand or reduce
if(!ParentSpaceOptionList.IsValidIndex(ArrayIndex))
{
ParentSpaceOptionList.AddZeroed(ArrayIndex-ParentSpaceOptionList.Num()+1);
int32 NumToAdd = ArrayIndex-ParentSpaceOptionList.Num()+1;
for(int32 Idx = 0 ; Idx < NumToAdd ; ++Idx)
{
ParentSpaceOptionList.Add(new TArray<TSharedPtr<FString>>);
}
}
// ParentSpaceComboBoxees creates 2 per element - one for translation, and one for rotation

View File

@@ -24,7 +24,7 @@ private:
// array custom boxes - these will stay around as long as this window is up
TArray<TSharedPtr<SEditableTextBox>> DisplayNameTextBoxes;
TArray<TArray<TSharedPtr<FString>>> ParentSpaceOptionList;
TIndirectArray<TArray<TSharedPtr<FString>>> ParentSpaceOptionList;
TArray<TSharedPtr<SComboBox< TSharedPtr<FString> >>> ParentSpaceComboBoxes;
/** we only support one item */