Summary
All 11 production call sites of RibbonController.Engines dereference the result with no null
guard. Issue #507 changed Engines from Globals.Engines to Globals?.Engines so the property
returns null instead of throwing when Globals is unassigned, matching the sibling SB
precedent. That fix is correct and is the behavior #507 specified, but on its own it relocates the
NullReferenceException rather than eliminating it: the same ribbon click now throws one frame
later, at the call site, instead of inside get_Engines().
Discovered during the feature review of #507 (bug/ribbon-controller-engines-null-unsafe-507).
Environment
- OS/version: Windows 11, Outlook desktop (VSTO add-in host)
- Runtime: .NET Framework 4.8.1, TaskMaster VSTO add-in
- Data source or fixture: Live Outlook profile during add-in startup
Steps to Reproduce
- Reload the TaskMaster add-in so the ribbon is constructed before the controller's
Globals is
assigned.
- Invoke any of the callbacks listed above.
- Observe a
NullReferenceException raised at the call site rather than inside get_Engines().
Expected Behavior
Each callback guards the Engines result and degrades gracefully when the engines are not yet
available, rather than dereferencing null.
Actual Behavior
Every call site dereferences Controller.Engines immediately with no guard.
Logs / Screenshots
(not provided in potential file)
Impact / Severity
Same narrow reachable window as #507: the callback must run before SetGlobals. The affected
callbacks are configuration submenu items rather than primary commands.
Source
From: docs/features/potential/2026-08-08-ribbon-engines-callers-unguarded-null-deref.md
Summary
All 11 production call sites of
RibbonController.Enginesdereference the result with no nullguard. Issue #507 changed
EnginesfromGlobals.EnginestoGlobals?.Enginesso the propertyreturns
nullinstead of throwing whenGlobalsis unassigned, matching the siblingSBprecedent. That fix is correct and is the behavior #507 specified, but on its own it relocates the
NullReferenceExceptionrather than eliminating it: the same ribbon click now throws one framelater, at the call site, instead of inside
get_Engines().Discovered during the feature review of #507 (
bug/ribbon-controller-engines-null-unsafe-507).Environment
Steps to Reproduce
Globalsisassigned.
NullReferenceExceptionraised at the call site rather than insideget_Engines().Expected Behavior
Each callback guards the
Enginesresult and degrades gracefully when the engines are not yetavailable, rather than dereferencing
null.Actual Behavior
Every call site dereferences
Controller.Enginesimmediately with no guard.Logs / Screenshots
(not provided in potential file)
Impact / Severity
Same narrow reachable window as #507: the callback must run before
SetGlobals. The affectedcallbacks are configuration submenu items rather than primary commands.
Source
From: docs/features/potential/2026-08-08-ribbon-engines-callers-unguarded-null-deref.md