Skip to content
Snippets Groups Projects
Commit dd9fc9f5 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

Fixed a crash that happened when trying to clear an EditorLine's points array.

parent 01b0f520
Branches
No related tags found
No related merge requests found
...@@ -329,7 +329,7 @@ void UGPUInstancedLineComponent::PostEditChangeChainProperty(FPropertyChangedCha ...@@ -329,7 +329,7 @@ void UGPUInstancedLineComponent::PostEditChangeChainProperty(FPropertyChangedCha
const int32 NumberOfPointsToRemove = FMath::Max(NumberOfPoints - 2, 0); const int32 NumberOfPointsToRemove = FMath::Max(NumberOfPoints - 2, 0);
for(int32 PointToRemove = 0; PointToRemove < NumberOfPointsToRemove; PointToRemove++) for(int32 PointToRemove = 0; PointToRemove < NumberOfPointsToRemove; PointToRemove++)
{ {
RemovePoint(EditorLines[EditorLineIndex].RespectiveLineId, 2 + PointToRemove); RemovePoint(EditorLines[EditorLineIndex].RespectiveLineId, 2); // just repeatedly delete point 2
} }
TArray<FVector> Pts = { FVector(0, 0, 0), FVector(0, 0, 0) }; TArray<FVector> Pts = { FVector(0, 0, 0), FVector(0, 0, 0) };
...@@ -1273,7 +1273,7 @@ bool UGPUInstancedLineComponent::RemoveAllEditorLines() ...@@ -1273,7 +1273,7 @@ bool UGPUInstancedLineComponent::RemoveAllEditorLines()
bool UGPUInstancedLineComponent::RemovePoint(int32 LineId, int32 PointId) bool UGPUInstancedLineComponent::RemovePoint(int32 LineId, int32 PointId)
{ {
TRACE_CPUPROFILER_EVENT_SCOPE(TEXT("UGPUInstancedLineComponent::RemoveLine")) TRACE_CPUPROFILER_EVENT_SCOPE(TEXT("UGPUInstancedLineComponent::RemovePoint"))
GPULineArray& Line = LineMap[LineId]; GPULineArray& Line = LineMap[LineId];
const GPULineIndices& Indices = Line[PointId]; const GPULineIndices& Indices = Line[PointId];
...@@ -1341,7 +1341,7 @@ bool UGPUInstancedLineComponent::RemovePoint(int32 LineId, int32 PointId) ...@@ -1341,7 +1341,7 @@ bool UGPUInstancedLineComponent::RemovePoint(int32 LineId, int32 PointId)
// todo // todo
bool UGPUInstancedLineComponent::RemovePoints(int32 LineId, int32 StartingPointId, int32 NumberOfPoints) bool UGPUInstancedLineComponent::RemovePoints(int32 LineId, int32 StartingPointId, int32 NumberOfPoints)
{ {
TRACE_CPUPROFILER_EVENT_SCOPE(TEXT("UGPUInstancedLineComponent::RemoveLine")) TRACE_CPUPROFILER_EVENT_SCOPE(TEXT("UGPUInstancedLineComponent::RemovePoints"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment