Skip to content

Commit a597178

Browse files
author
Stewart Miles
committed
Fixed package progress report when no packages are being migrated.
Change-Id: Ia25b01074bf788617173b18c3d1cd4ba54013e40
1 parent 6b6ac53 commit a597178

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/UnityPackageManagerResolver/src/PackageMigrator.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -858,9 +858,10 @@ private static void UpdateFindProgressBar(float progress, string description) {
858858
/// <param name="progress">Progress (0..1).</param>
859859
/// <param name="packageMap">Package being migrated.</param>
860860
private static void UpdatePackageMigrationProgressBar(float progress, PackageMap packageMap) {
861-
var description = String.Format("{0} --> {1}",
862-
packageMap.VersionHandlerPackageId,
863-
packageMap.UnityPackageManagerPackageId);
861+
var description = packageMap != null ?
862+
String.Format("{0} --> {1}",
863+
packageMap.VersionHandlerPackageId,
864+
packageMap.UnityPackageManagerPackageId) : "(none)";
864865
var message = String.Format("Migrating package(s) {0}%: {1}",
865866
(int)(progress * 100.0f), description);
866867
Logger.Log(message, level: LogLevel.Verbose);

0 commit comments

Comments
 (0)