Skip to content

Commit c2270c1

Browse files
Sachin-NIEpica3055
authored andcommitted
Resolved issue in sending WM_DESTROY msg to ActiveX controls (#12564)
1 parent 7a4fa49 commit c2270c1

File tree

1 file changed

+2
-1
lines changed
  • src/System.Windows.Forms/src/System/Windows/Forms/ActiveX

1 file changed

+2
-1
lines changed

src/System.Windows.Forms/src/System/Windows/Forms/ActiveX/AxHost.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3234,8 +3234,9 @@ protected override unsafe void WndProc(ref Message m)
32343234

32353235
private unsafe void DetachAndForward(ref Message m)
32363236
{
3237+
bool isHandleCreated = IsHandleCreated;
32373238
DetachWindow();
3238-
if (IsHandleCreated)
3239+
if (isHandleCreated)
32393240
{
32403241
void* wndProc = (void*)PInvoke.GetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_WNDPROC);
32413242
m.ResultInternal = PInvoke.CallWindowProc(

0 commit comments

Comments
 (0)