Repository: microsoft/terminal (language: cpp)

Issue:
PGO is failing - unpackaged preview build crashes on startup setting up quick fix menu
```
0:017> k
 # Child-SP          RetAddr               Call Site
00 00000048`346fe970 00007ffe`c52a036d     TerminalApp!winrt::impl::consume_Windows_UI_Xaml_Controls_Primitives_IFlyoutBase<winrt::Windows::UI::Xaml::Controls::MenuFlyout>::Opening+0x81 [C:\a\_work\1\s\src\cascadia\TerminalApp\Generated Files\winrt\Windows.UI.Xaml.Controls.Primitives.h @ 949] 
01 00000048`346fe9c0 00007ffe`c51a2d2d     TerminalApp!winrt::TerminalApp::implementation::TerminalPage::_RegisterTerminalEvents+0xd3d [C:\a\_work\1\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 1763] 
02 00000048`346fea60 00007ffe`c51a3153     TerminalApp!winrt::TerminalApp::implementation::TerminalPage::_SetupControl+0xcd [C:\a\_work\1\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 3152] 
03 00000048`346feaa0 00007ffe`c5292c2c     TerminalApp!winrt::TerminalApp::implementation::TerminalPage::_CreateNewControlAndContent+0x1c3 [C:\a\_work\1\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 3120] 
04 00000048`346feb60 00007ffe`c5290f5f     TerminalApp!winrt::TerminalApp::implementation::TerminalPage::_MakeTerminalPane+0xf9c [C:\a\_work\1\s\src\cascadia\TerminalApp\TerminalPage.cpp @ 3242] 
```

```
ExceptionAddress: 00007ffec50f8be1 (TerminalApp!winrt::impl::consume_Windows_UI_Xaml_Controls_Primitives_IFlyoutBase<winrt::Windows::UI::Xaml::Controls::MenuFlyout>::Opening+0x0000000000000081)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000001
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000000000000
Attempt to read from address 0000000000000000
```

Somebody's null!



![Image](https://github.com/user-attachments/assets/5f2526df-c8a8-4922-aadd-9e42602fa37e)




Discussion / hints:

Fix patch:
diff --git a/src/cascadia/TerminalApp/TerminalPage.cpp b/src/cascadia/TerminalApp/TerminalPage.cpp
index 4f8c231411c..b03b7e37210 100644
--- a/src/cascadia/TerminalApp/TerminalPage.cpp
+++ b/src/cascadia/TerminalApp/TerminalPage.cpp
@@ -1760,12 +1760,15 @@ namespace winrt::TerminalApp::implementation
                 page->_PopulateContextMenu(weakTerm.get(), sender.try_as<MUX::Controls::CommandBarFlyout>(), true);
             }
         });
-        term.QuickFixMenu().Opening([weak = get_weak(), weakTerm](auto&& sender, auto&& /*args*/) {
-            if (const auto& page{ weak.get() })
-            {
-                page->_PopulateQuickFixMenu(weakTerm.get(), sender.try_as<Controls::MenuFlyout>());
-            }
-        });
+        if constexpr (Feature_QuickFix::IsEnabled())
+        {
+            term.QuickFixMenu().Opening([weak = get_weak(), weakTerm](auto&& sender, auto&& /*args*/) {
+                if (const auto& page{ weak.get() })
+                {
+                    page->_PopulateQuickFixMenu(weakTerm.get(), sender.try_as<Controls::MenuFlyout>());
+                }
+            });
+        }
     }
 
     // Method Description:
diff --git a/src/cascadia/TerminalControl/TermControl.xaml b/src/cascadia/TerminalControl/TermControl.xaml
index bcbabf0daf4..b0b24c47ced 100644
--- a/src/cascadia/TerminalControl/TermControl.xaml
+++ b/src/cascadia/TerminalControl/TermControl.xaml
@@ -1286,7 +1286,6 @@
                                 Padding="0"
                                 HorizontalContentAlignment="Center"
                                 VerticalContentAlignment="Center"
-                                x:Load="False"
                                 AllowFocusOnInteraction="False"
                                 CornerRadius="0,5,5,0"
                                 PointerEntered="_QuickFixButton_PointerEntered"


Test patch: