Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added two null checks for guide meshes during set and destruction #45

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added two null checks for guide meshes during set and destruction
Fixes some edge case crashes
  • Loading branch information
puchik committed Jan 4, 2025
commit ae5a412cbe2e11ceb39ecffad147701016de8d69
6 changes: 4 additions & 2 deletions Source/GFur/Private/FurSkinData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,8 @@ FFurSkinData::~FFurSkinData()
if (SkeletalMesh)
SkeletalMesh->RemoveFromRoot();
for (USkeletalMesh* Mesh : GuideMeshes)
Mesh->RemoveFromRoot();
if (Mesh)
Mesh->RemoveFromRoot();
#endif // WITH_EDITORONLY_DATA
}

Expand Down Expand Up @@ -1098,7 +1099,8 @@ void FFurSkinData::Set(int32 InFurLayerCount, int32 InLod, class UGFurComponent*
if (SkeletalMesh)
SkeletalMesh->RemoveFromRoot();
for (USkeletalMesh* Mesh : GuideMeshes)
Mesh->RemoveFromRoot();
if (Mesh)
Mesh->RemoveFromRoot();
#endif // WITH_EDITORONLY_DATA


Expand Down