From c18ce5e811122480a7c071d5c08d0ead831ef408 Mon Sep 17 00:00:00 2001 From: "Hedden, Kyle Matthew" Date: Fri, 21 Jun 2024 10:27:12 -0400 Subject: [PATCH] Digital PCT265 defect CXTDT-574791: Prevent crash when modifying the controller array slice. --- .../MVMCore/PresentationHandling/NavigationOperation.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCore/MVMCore/PresentationHandling/NavigationOperation.swift b/MVMCore/MVMCore/PresentationHandling/NavigationOperation.swift index a6aa16c..d8aef54 100644 --- a/MVMCore/MVMCore/PresentationHandling/NavigationOperation.swift +++ b/MVMCore/MVMCore/PresentationHandling/NavigationOperation.swift @@ -68,9 +68,9 @@ open class NavigationOperation: MVMCoreOperation, UINavigationControllerDelegate let index = navigationController.getIndexOfViewController(with: pageType) else { return false } - var viewControllers = navigationController.viewControllers[...index] + var viewControllers = Array(navigationController.viewControllers[...index]) viewControllers[index] = viewController - set(viewControllers: Array(viewControllers), navigationController: navigationController, animated: animated) + set(viewControllers: viewControllers, navigationController: navigationController, animated: animated) return true }