Skip to content

Commit a8495bd

Browse files
committed
Fix crash when saving project.
Fixes a crash that happens when a project is saved, if that project had an build phase exception set that's the child of a build phase that does not have a name. For example, the "Compile Sources" build phase does not have a name, and could lead to this crash.
1 parent ab3dfa5 commit a8495bd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/xcodeproj/project/object/file_system_synchronized_exception_set.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,12 @@ class PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet < AbstractO
5454
attribute :platform_filters_by_relative_path, Hash
5555

5656
def display_name
57-
"Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{build_phase.name}\" build phase"
57+
build_phase_identifier = if build_phase.respond_to?(:name) && build_phase.name
58+
build_phase.name
59+
else
60+
build_phase.uuid
61+
end
62+
"Exceptions for \"#{GroupableHelper.parent(self).display_name}\" folder in \"#{build_phase_identifier}\" build phase"
5863
end
5964
end
6065
end

0 commit comments

Comments
 (0)