Skip to content

Commit

Permalink
Fix null ref
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Feb 2, 2025
1 parent e7cf25f commit c9bd7b7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions NAPS2.Lib.WinForms/WinForms/ToolbarFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void RelayoutToolbar(ToolStrip tStrip, float scaleFactor)
// Recalculate sizes
Invoker.Current.InvokeDispatch(() =>
{
if (tStrip.Parent == null) return;
if (tStrip.Parent.Dock == DockStyle.Top || tStrip.Parent.Dock == DockStyle.Bottom)
{
// TODO: If we cache the used width, this check doesn't require any layout - so we can run it on form resize to see if we need to relayout
Expand Down

0 comments on commit c9bd7b7

Please sign in to comment.