From 55db4a2ab0af6c55cd6794a904e6b1c89161b760 Mon Sep 17 00:00:00 2001 From: Ranjesh Jaganathan <28935693+ranjeshj@users.noreply.github.com> Date: Tue, 24 Nov 2020 08:30:37 -0800 Subject: [PATCH] fix crash in navview when tabbing --- dev/NavigationView/NavigationView.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/NavigationView/NavigationView.cpp b/dev/NavigationView/NavigationView.cpp index 9f89157afd..e3529a76d8 100644 --- a/dev/NavigationView/NavigationView.cpp +++ b/dev/NavigationView/NavigationView.cpp @@ -1063,6 +1063,11 @@ winrt::ItemsRepeater NavigationView::GetParentRootItemsRepeaterForContainer(cons while (!IsRootItemsRepeater(parentIR)) { currentNvib = GetParentNavigationViewItemForContainer(currentNvib); + if (!currentNvib) + { + return nullptr; + } + parentIR = GetParentItemsRepeaterForContainer(currentNvib); } return parentIR;