Fix a crash for users without a tab theme#16046
Conversation
| { | ||
| newTabImpl->UpdateIcon(profile.Icon(), _settings.GlobalSettings().CurrentTheme().Tab().IconStyle()); | ||
| const auto theme = _settings.GlobalSettings().CurrentTheme(); | ||
| const auto iconStyle = (theme && theme.Tab()) ? theme.Tab().IconStyle() : IconStyle::Default; |
There was a problem hiding this comment.
const auto tab = theme ? theme.Tab() : nullptr;
const auto iconStyle = tab ? tab. IconStyle() : IconStyle::Default;…for the Tab() call deduplication (untested code). Not really an issue tho. Might not even be worth a "nit".
We had the same for Window last time. How do we remove this category of issues? |
off the top of the dome: we change terminal/src/cascadia/TerminalSettingsModel/MTSMSettings.h Lines 138 to 141 in 310814b and instead make them all ctor to |
|
FWIW that's not going to be particularly cheap with our current setup, because when the We can make it cheap by changing the implementation to store the WinRT type |
One day into 1.19, and there's a LOT of hits here (**76.25%** of our ~300 crashes). A crash if the Theme doesn't have a `tab` member. Regressed in #15948 Closes MSFT:46714723 (cherry picked from commit cf19385) Service-Card-Id: 90670731 Service-Version: 1.19
One day into 1.19, and there's a LOT of hits here (76.25% of our ~300 crashes). A crash if the Theme doesn't have a
tabmember.Regressed in #15948
Closes MSFT:46714723