Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9806,9 +9806,6 @@ internal virtual void RecreateHandleCore()
// the call shouldn't fail.
// However, it could fail if this.CreateParams.Parent is changed outside our control.
CreateHandle();

// DestroyHandle resets the state, but CreateHandle doesn't set the state back.
SetState(States.Created, true);
}
catch (Exception)
{
Expand Down Expand Up @@ -9838,7 +9835,7 @@ internal virtual void RecreateHandleCore()
// - or -
// CreateHandle is successful.
// We will move the child controls to the new parent.
if (controlSnapshot is not null && GetState(States.Created))
if (controlSnapshot is not null && IsHandleCreated)
{
for (int i = 0; i < controlSnapshot.Length; i++)
{
Expand Down