diff --git a/Fluent.Ribbon/Automation/Peers/RibbonGroupBoxAutomationPeer.cs b/Fluent.Ribbon/Automation/Peers/RibbonGroupBoxAutomationPeer.cs index f0903b61d..6d7a08831 100644 --- a/Fluent.Ribbon/Automation/Peers/RibbonGroupBoxAutomationPeer.cs +++ b/Fluent.Ribbon/Automation/Peers/RibbonGroupBoxAutomationPeer.cs @@ -38,7 +38,8 @@ private RibbonGroupHeaderAutomationPeer HeaderPeer this.headerPeer = new RibbonGroupHeaderAutomationPeer(this.OwningGroup.CollapsedHeaderContentControl); } } - else if (this.OwningGroup.Header != null) + else if (this.OwningGroup.Header != null + && this.OwningGroup.HeaderContentControl != null) { this.headerPeer = new RibbonGroupHeaderAutomationPeer(this.OwningGroup.HeaderContentControl); }