From 1f2d163b4e9639fff0e86216387baf2f2c0f2cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Brid?= <36547063+RBrid@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:19:37 -0700 Subject: [PATCH] Revert "CommandBarFlyout fix for internal bug 35782367 (#5937)" (#6103) This reverts commit 03a091b8c69d76f010f7f772a078db55b3710488. Undoing CommandBarFlyout changes because of crash regressions. --- dev/CommandBarFlyout/CommandBarFlyout.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dev/CommandBarFlyout/CommandBarFlyout.cpp b/dev/CommandBarFlyout/CommandBarFlyout.cpp index f05feba4bd..9af0107f0d 100644 --- a/dev/CommandBarFlyout/CommandBarFlyout.cpp +++ b/dev/CommandBarFlyout/CommandBarFlyout.cpp @@ -251,14 +251,11 @@ CommandBarFlyout::CommandBarFlyout() args.Cancel(true); commandBar->PlayCloseAnimation( - [weakThis{ get_weak() }]() + [this]() { - if (auto strongThis = weakThis.get()) - { - strongThis->m_isClosingAfterCloseAnimation = true; - strongThis->Hide(); - strongThis->m_isClosingAfterCloseAnimation = false; - } + m_isClosingAfterCloseAnimation = true; + Hide(); + m_isClosingAfterCloseAnimation = false; }); } else