Skip to content

Commit

Permalink
Enable nullability in DesignerWindowTarget (#11279)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetrou committed Apr 30, 2024
1 parent 2535204 commit 2d02446
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable disable

namespace System.Windows.Forms.Design;

public partial class ControlDesigner
Expand Down Expand Up @@ -30,7 +28,7 @@ public void Dispose()
if (_designer is not null)
{
_designer.Control.WindowTarget = _oldTarget;
_designer = null;
_designer = null!;
}
}

Expand All @@ -51,7 +49,7 @@ public void OnMessage(ref Message m)
ControlDesigner currentDesigner = _designer;
if (currentDesigner is not null)
{
IDesignerTarget designerTarget = currentDesigner.DesignerTarget;
IDesignerTarget? designerTarget = currentDesigner.DesignerTarget;
currentDesigner.DesignerTarget = this;
try
{
Expand Down

0 comments on commit 2d02446

Please sign in to comment.